public override bool Equals(object obj) { if (obj == null) { return(Source == null); } SourceInfo info = obj as SourceInfo; if (info != null) { return(Source == info.Source); } return(false); }
internal void ILGenLoad(string source, Type type) { if (source.StartsWith("o.@", StringComparison.Ordinal)) { System.Diagnostics.Debug.Assert(memberInfos.ContainsKey(source.Substring(3))); MemberInfo memInfo = memberInfos[source.Substring(3)]; ilg.LoadMember(ilg.GetVariable("o"), memInfo); if (type != null) { Type memType = memInfo is FieldInfo ? ((FieldInfo)memInfo).FieldType : ((PropertyInfo)memInfo).PropertyType; ilg.ConvertValue(memType, type); } } else { SourceInfo info = new SourceInfo(source, null, null, null, ilg); info.Load(type); } }