public virtual NonRecursiveElement ToNonRecursiveElement( ImmutableObjectGraph.Optional <System.String> name = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> value = default(ImmutableObjectGraph.Optional <System.String>)) { NonRecursiveElement that = this as NonRecursiveElement; if (that != null && this.GetType().IsEquivalentTo(typeof(NonRecursiveElement))) { if ((!name.IsDefined || name.Value == that.Name) && (!value.IsDefined || value.Value == that.Value)) { return(that); } } return(NonRecursiveElement.CreateWithIdentity( identity: this.Identity, name: name, value: value)); }
/// <summary>Removes the specified element from the Metadata collection.</summary> public ContainerOfNonRecursiveCollection RemoveMetadata(NonRecursiveElement value) { return(this.With(metadata: this.Metadata.Remove(value))); }