예제 #1
0
            public static bool TryParse(string value, out ConformanceEventMode result)
            {
                result = default(ConformanceEventMode);

                if( value=="sender")
                    result = ConformanceEventMode.Sender;
                else if( value=="receiver")
                    result = ConformanceEventMode.Receiver;
                else
                    return false;

                return true;
            }
예제 #2
0
 public static string ToString(ConformanceEventMode value)
 {
     if( value==ConformanceEventMode.Sender )
         return "sender";
     else if( value==ConformanceEventMode.Receiver )
         return "receiver";
     else
         throw new ArgumentException("Unrecognized ConformanceEventMode value: " + value.ToString());
 }