/*
Test.Module.RecordingMode.cs
Copyright © 2008
Diversified Technical Systems, Inc.
All Rights Reserved
*/
using DTS.Common.Enums.DASFactory;
using System;
using System.ComponentModel;
namespace DTS.Common.DAS.Concepts
{
// *** see Test.cs ***
public partial class Test
{
///
/// A container for DTS generic module concepts.
///
public sealed partial class Module
{
///
/// Convert a string representation of a recording mode enumeration into its corresponding
/// enumeration value.
///
///
///
/// The representation to be converted.
///
///
///
/// The value corresponding to the
/// specified string, if any. If not, an exception will be thrown.
///
///
public static DFConstantsAndEnums.RecordingMode GetRecordingModeFromString(string recordingMode)
{
try
{
return (DFConstantsAndEnums.RecordingMode)Enum.Parse(typeof(DFConstantsAndEnums.RecordingMode), recordingMode);
}
catch (Exception ex)
{
throw new Exception("encountered problem getting recording mode from string representation " + (null != recordingMode ? "\"" + recordingMode + "\"" : "<>"), ex);
}
}
}
}
}