public bool Equals(DestinyCharacterRenderComponent input) { if (input == null) { return(false); } return (( CustomDyes == input.CustomDyes || (CustomDyes != null && CustomDyes.SequenceEqual(input.CustomDyes)) ) && ( Customization == input.Customization || (Customization != null && Customization.Equals(input.Customization)) ) && ( PeerView == input.PeerView || (PeerView != null && PeerView.Equals(input.PeerView)) )); }
/// <summary> /// Copia as informações de outra instância. /// </summary> /// <param name="source"></param> /// <returns></returns> public IStatebleItem CopyFrom(IStatebleItem source) { if (source == null) { return(this); } Identifier = source.Identifier; IsConfigured = source.IsConfigured; ReloadSettings = source.ReloadSettings; CopyValue = source.CopyValue; Options = source.Options; if ((CheckDigits == null) || (source.CheckDigits == null) || (CheckDigits.Base != source.CheckDigits.Base) || (CheckDigits.Digits != source.CheckDigits.Digits) || (CheckDigits.Limit != source.CheckDigits.Limit) || (CheckDigits.Start != source.CheckDigits.Start)) { CheckDigits = source.CheckDigits; } if ((Customization == null) || (!Customization.Equals(source.Customization))) { Customization = source.Customization; } if ((DefaultValue == null) || (source.DefaultValue == null) || (!String.Equals(DefaultValue.DefaultValue, source.DefaultValue.DefaultValue))) { DefaultValue = source.DefaultValue; } if ((IndexedValues == null) || (source.IndexedValues == null) || (!Enumerable.SequenceEqual(IndexedValues.Select(d => d.IndexDescription + "!" + d.IndexValue), source.IndexedValues.Select(d => d.IndexDescription + "!" + d.IndexValue)))) { IndexedValues = source.IndexedValues; } if ((Label == null) || (source.Label == null) || (!String.Equals(Label.Title, source.Label.Title)) || (!String.Equals(Label.Description, source.Label.Description))) { Label = source.Label; } if ((Length == null) || (source.Length == null) || (Math.Abs(Length.MaxValue - source.Length.MaxValue) > 1E-3) || (Math.Abs(Length.MinValue - source.Length.MinValue) > 1E-3)) { Length = source.Length; } if ((Mask == null) || (source.Mask == null) || (!String.Equals(Mask.Mask, source.Mask.Mask))) { Mask = source.Mask; } if (!Object.Equals(Parser, source.Parser)) { Parser = source.Parser; } if ((Range == null) || (source.Range == null) || (!String.Equals(Range.FromValue, source.Range.FromValue)) || (!String.Equals(Range.ToValue, source.Range.ToValue))) { Range = source.Range; } var asEquatable = Validation as IEquatable <IValidator>; if ((Validation == null) || (source.Validation == null) || (!String.Equals(Validation.DefaultMessageTemplate, source.Validation.DefaultMessageTemplate)) || (!String.Equals(Validation.FullName, source.Validation.FullName)) || (Validation.IsExclusiveInList != source.Validation.IsExclusiveInList) || (!String.Equals(Validation.ReturnedParameters, source.Validation.ReturnedParameters)) || (asEquatable == null) || (!asEquatable.Equals(source.Validation))) { Validation = source.Validation; } if ((ValidChars == null) || (source.ValidChars == null) || (!String.Equals(ValidChars.ValidChars, source.ValidChars.ValidChars))) { ValidChars = source.ValidChars; } if ((Values == null) || (source.Values == null) || (!Enumerable.SequenceEqual(Values.Select(v => v.Value), source.Values.Select(v => v.Value)))) { Values = source.Values; } return(this); }