ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/RomCheater/trunk/RomCheater.Logging/logger.cs
(Generate patch)

Comparing trunk/RomCheater.Logging/logger.cs (file contents):
Revision 264 by william, Mon May 28 07:22:19 2012 UTC vs.
Revision 265 by william, Sun Jun 3 19:47:47 2012 UTC

# Line 59 | Line 59 | namespace RomCheater.Logging
59          #region implicit operators
60          public static implicit operator loggerflagsbase<TValue>(EnumNameValuePair<TValue> t) { return new loggerflagsbase<TValue>(t); }
61          public static implicit operator EnumNameValuePair<TValue>(loggerflagsbase<TValue> t) { return new loggerflagsbase<TValue>(t); }
62 <        public static implicit operator loggerflagsbase<TValue>(TValue t)
62 >        public static implicit operator loggerflagsbase<TValue>(TValue t)
63          {
64              foreach (KeyValuePair<TValue, EnumNameValuePair<TValue>> pair in value_pairs) { EnumNameValuePair<TValue> l = pair.Value; if (l.Value.Equals(t)) { return new loggerflagsbase<TValue>(l); } }
65              return loggerflagsbase<TValue>.NONE;
# Line 122 | Line 122 | namespace RomCheater.Logging
122      public class loggerflags : loggerflagsbase<ushort>
123      {
124            protected loggerflags() :base()        {        }
125        //protected loggerflags(ushort t) : this() { CurrentValue = new EnumNameValuePair< ushort>("", t); }
125            protected loggerflags(EnumNameValuePair<ushort> t) : base(t) { }
126            protected loggerflags(loggerflagsbase<ushort> t) : base(t) { }
127          #region implicit operators
128            public static implicit operator loggerflags(EnumNameValuePair<ushort> t) { return new loggerflags(t); }
129 <          public static implicit operator EnumNameValuePair<ushort>(loggerflags t) { return new loggerflags(t.Value); }
129 >          public static implicit operator EnumNameValuePair<ushort>(loggerflags t) { return new EnumNameValuePair<ushort>(t.Name,t.Value); }
130            public static implicit operator ushort(loggerflags t) { return t.Value; }
131            public static implicit operator loggerflags(ushort t) { return new loggerflags(t); }
132            public static implicit operator string(loggerflags t) { return t.Name; }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines