init
This commit is contained in:
54
Common/DTS.Common.DAS.Concepts/Test/Module/RecordingMode.cs
Normal file
54
Common/DTS.Common.DAS.Concepts/Test/Module/RecordingMode.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user