/// <summary> /// Generate the method for the current ObjectType. /// </summary> /// <returns>Builded method</returns> protected override IResponse InternalMake() { Type normalizedType = ctx.ObjectType; ArgumentElement instance = new ArgumentElement(0, ctx.ObjectType); if (ctx.IsDeserializing) { normalizedType = normalizedType.GetElementType(); CreateAndAssignNewInstance(instance, null); } var versions = VersionHelper.GetExplicitlyManagedVersions(normalizedType).ToArray(); if (versions.Length > 1) { ManageVersions(instance, versions, normalizedType); } else { BuildFromFields(VersionHelper.GetAllFields(instance, normalizedType)); ctx.G.Return(); } return(ctx.Provider.GetMethod()); }
public bool Equals(ArgumentElement other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return Equals(other.Id, Id); }
public bool Equals(ArgumentElement other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(Equals(other.Id, Id)); }