12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- #region --------------- Copyright Dresser Wayne Pignone -------------
- /*
- * $Log: /Wrk/WayneLibraries/Wrk/StateEngine/AnyState.cs $
- *
- * 3 08-03-25 14:25 Mattias.larsson
- * Added 'new' to FactoryName.
- *
- * 2 08-03-25 14:14 Mattias.larsson
- * Added static members FactoryName and GetInstanceName().
- */
- #endregion
- namespace Wayne.Lib.StateEngine
- {
- /// <summary>
- /// This is used to define the sourcestate as any state, a wildcard,
- /// if we want to create a general transition from a unspecified state in a machine.
- /// </summary>
- public sealed class AnyState : State
- {
- #region Static Fields
- private static string factoryName;
- #endregion
- #region Static Properties
- /// <summary>
- /// The factory name of the AnyState.
- /// </summary>
- public new static string FactoryName
- {
- get
- {
- if (factoryName == null)
- factoryName = typeof(AnyState).FullName;
- return factoryName;
- }
- }
- #endregion
- #region Static Methods
- /// <summary>
- /// Gets the name of this instance in a given configuration, using the supplied parent state instance name.
- /// </summary>
- /// <param name="parentStateInstanceName"></param>
- /// <returns></returns>
- public static string GetInstanceName(string parentStateInstanceName)
- {
- return string.Concat(parentStateInstanceName, ".", typeof(AnyState).Name);
- }
- #endregion
- }
- }
|