55 lines
1.7 KiB
Plaintext
55 lines
1.7 KiB
Plaintext
/*
|
|
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
|
|
{
|
|
/// <summary>
|
|
/// A container for DTS generic module concepts.
|
|
/// </summary>
|
|
public sealed partial class Module
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
/// Convert a string representation of a recording mode enumeration into its corresponding
|
|
/// enumeration value.
|
|
/// </summary>
|
|
///
|
|
/// <param name="recordingMode">
|
|
/// The <see cref="string"/> representation to be converted.
|
|
/// </param>
|
|
///
|
|
/// <returns>
|
|
/// The <see cref="Test.Module.RecordingMode"/> value corresponding to the
|
|
/// specified string, if any. If not, an exception will be thrown.
|
|
/// </returns>
|
|
///
|
|
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 + "\"" : "<<NULL>>"), ex);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|