public override bool TryFind(string wanted, out MergerTypeBase result) { var parts = wanted.Split(new[] { '.' }, 2); var head = parts.FirstOrDefault(); var tail = parts.SecondOrDefault(); if (Equals(head, Identifier)) { if (string.IsNullOrEmpty(tail)) { result = this; return(true); } foreach (var property in Properties) { if (property.TryFind(tail, out result)) { return(true); } } foreach (var node in Nodes) { if (node.TryFind(tail, out result)) { return(true); } } } result = null; return(false); }
public override bool TryFind(PropertyInfo wanted, out MergerTypeBase result) { if (Equals(wanted, Property)) { result = this; return(true); } result = null; return(false); }
public override bool TryFind(string wanted, out MergerTypeBase result) { if (Equals(wanted, Identifier)) { result = this; return(true); } result = null; return(false); }
public override bool TryFind(PropertyInfo wanted, out MergerTypeBase result) { if (Equals(Property, wanted)) { result = this; return(true); } foreach (var property in Properties) { if (property.TryFind(wanted, out result)) { return(true); } } foreach (var node in Nodes) { if (node.TryFind(wanted, out result)) { return(true); } } result = null; return(false); }
public abstract bool TryFind(PropertyInfo wanted, out MergerTypeBase result);
public abstract bool TryFind(string wanted, out MergerTypeBase result);