/[RomCheater]/trunk/RomCheater.Logging/logger.cs
ViewVC logotype

Diff of /trunk/RomCheater.Logging/logger.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater.Logging/logger.cs	2012/05/28 07:22:19	163
+++ trunk/RomCheater.Logging/logger.cs	2012/06/03 19:47:47	265
@@ -59,7 +59,7 @@
         #region implicit operators
         public static implicit operator loggerflagsbase<TValue>(EnumNameValuePair<TValue> t) { return new loggerflagsbase<TValue>(t); }
         public static implicit operator EnumNameValuePair<TValue>(loggerflagsbase<TValue> t) { return new loggerflagsbase<TValue>(t); }
-        public static implicit operator loggerflagsbase<TValue>(TValue t) 
+        public static implicit operator loggerflagsbase<TValue>(TValue t)
         {
             foreach (KeyValuePair<TValue, EnumNameValuePair<TValue>> pair in value_pairs) { EnumNameValuePair<TValue> l = pair.Value; if (l.Value.Equals(t)) { return new loggerflagsbase<TValue>(l); } }
             return loggerflagsbase<TValue>.NONE;
@@ -122,12 +122,11 @@
     public class loggerflags : loggerflagsbase<ushort>
     {
           protected loggerflags() :base()        {        }
-        //protected loggerflags(ushort t) : this() { CurrentValue = new EnumNameValuePair< ushort>("", t); }
           protected loggerflags(EnumNameValuePair<ushort> t) : base(t) { }
           protected loggerflags(loggerflagsbase<ushort> t) : base(t) { }
         #region implicit operators
           public static implicit operator loggerflags(EnumNameValuePair<ushort> t) { return new loggerflags(t); }
-          public static implicit operator EnumNameValuePair<ushort>(loggerflags t) { return new loggerflags(t.Value); }
+          public static implicit operator EnumNameValuePair<ushort>(loggerflags t) { return new EnumNameValuePair<ushort>(t.Name,t.Value); }
           public static implicit operator ushort(loggerflags t) { return t.Value; }
           public static implicit operator loggerflags(ushort t) { return new loggerflags(t); }
           public static implicit operator string(loggerflags t) { return t.Name; }

 

  ViewVC Help
Powered by ViewVC 1.1.22