/// <summary>Returns a new instance of this object with any number of properties changed.</summary> private TreeNode WithFactory( ImmutableObjectGraph.Optional <System.String> caption = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> filePath = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.Boolean> visible = default(ImmutableObjectGraph.Optional <System.Boolean>), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableHashSet <System.String> > attributes = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableHashSet <System.String> >), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <TreeNode> > children = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <TreeNode> >), ImmutableObjectGraph.Optional <System.UInt32> identity = default(ImmutableObjectGraph.Optional <System.UInt32>)) { if ( (identity.IsDefined && identity.Value != this.Identity) || (caption.IsDefined && caption.Value != this.Caption) || (filePath.IsDefined && filePath.Value != this.FilePath) || (visible.IsDefined && visible.Value != this.Visible) || (attributes.IsDefined && attributes.Value != this.Attributes) || (children.IsDefined && children.Value != this.Children)) { var lookupTable = children.IsDefined && children.Value != this.Children ? default(Optional <System.Collections.Immutable.ImmutableDictionary <System.UInt32, System.Collections.Generic.KeyValuePair <TreeNode, System.UInt32> > >) : Optional.For(this.lookupTable); return(new TreeNode( identity: identity.GetValueOrDefault(this.Identity), caption: caption.GetValueOrDefault(this.Caption), filePath: filePath.GetValueOrDefault(this.FilePath), visible: visible.GetValueOrDefault(this.Visible), attributes: attributes.GetValueOrDefault(this.Attributes), children: children.GetValueOrDefault(this.Children), lookupTable: lookupTable)); } else { return(this); } }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> public virtual TreeNode With( ImmutableObjectGraph.Optional <System.String> caption = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> filePath = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.Boolean> visible = default(ImmutableObjectGraph.Optional <System.Boolean>), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableHashSet <System.String> > attributes = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableHashSet <System.String> >), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <TreeNode> > children = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <TreeNode> >)) { if ( (caption.IsDefined && caption.Value != this.Caption) || (filePath.IsDefined && filePath.Value != this.FilePath) || (visible.IsDefined && visible.Value != this.Visible) || (attributes.IsDefined && attributes.Value != this.Attributes) || (children.IsDefined && children.Value != this.Children)) { return(new TreeNode( caption: caption.GetValueOrDefault(this.Caption), filePath: filePath.GetValueOrDefault(this.FilePath), visible: visible.GetValueOrDefault(this.Visible), attributes: attributes.GetValueOrDefault(this.Attributes), children: children.GetValueOrDefault(this.Children))); } else { return(this); } }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> private ReqAndHierL2 WithFactory( ImmutableObjectGraph.Optional <System.String> l1Field1 = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> l1Field2 = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> l2Field1 = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> l2Field2 = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.UInt32> identity = default(ImmutableObjectGraph.Optional <System.UInt32>)) { if ( (identity.IsDefined && identity.Value != this.Identity) || (l1Field1.IsDefined && l1Field1.Value != this.L1Field1) || (l1Field2.IsDefined && l1Field2.Value != this.L1Field2) || (l2Field1.IsDefined && l2Field1.Value != this.L2Field1) || (l2Field2.IsDefined && l2Field2.Value != this.L2Field2)) { return(new ReqAndHierL2( identity: identity.GetValueOrDefault(this.Identity), l1Field1: l1Field1.GetValueOrDefault(this.L1Field1), l1Field2: l1Field2.GetValueOrDefault(this.L1Field2), l2Field1: l2Field1.GetValueOrDefault(this.L2Field1), l2Field2: l2Field2.GetValueOrDefault(this.L2Field2))); } else { return(this); } }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> public virtual Message With( ImmutableObjectGraph.Optional <Contact> author = default(ImmutableObjectGraph.Optional <Contact>), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <Contact> > to = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <Contact> >), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <Contact> > cc = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <Contact> >), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <Contact> > bcc = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <Contact> >), ImmutableObjectGraph.Optional <System.String> subject = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> body = default(ImmutableObjectGraph.Optional <System.String>)) { if ( (author.IsDefined && author.Value != this.Author) || (to.IsDefined && to.Value != this.To) || (cc.IsDefined && cc.Value != this.Cc) || (bcc.IsDefined && bcc.Value != this.Bcc) || (subject.IsDefined && subject.Value != this.Subject) || (body.IsDefined && body.Value != this.Body)) { return(new Message( author: author.GetValueOrDefault(this.Author), to: to.GetValueOrDefault(this.To), cc: cc.GetValueOrDefault(this.Cc), bcc: bcc.GetValueOrDefault(this.Bcc), subject: subject.GetValueOrDefault(this.Subject), body: body.GetValueOrDefault(this.Body))); } else { return(this); } }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> private ConcreteOf2Abstracts WithFactory( ImmutableObjectGraph.Optional <System.Int32> abstract1Field1 = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <System.Int32> abstract1Field2 = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <System.Int32> abstract2Field1 = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <System.Int32> abstract2Field2 = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <System.Int32> concreteField1 = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <System.Int32> concreteField2 = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <System.UInt32> identity = default(ImmutableObjectGraph.Optional <System.UInt32>)) { if ( (identity.IsDefined && identity.Value != this.Identity) || (abstract1Field1.IsDefined && abstract1Field1.Value != this.Abstract1Field1) || (abstract1Field2.IsDefined && abstract1Field2.Value != this.Abstract1Field2) || (abstract2Field1.IsDefined && abstract2Field1.Value != this.Abstract2Field1) || (abstract2Field2.IsDefined && abstract2Field2.Value != this.Abstract2Field2) || (concreteField1.IsDefined && concreteField1.Value != this.ConcreteField1) || (concreteField2.IsDefined && concreteField2.Value != this.ConcreteField2)) { return(new ConcreteOf2Abstracts( identity: identity.GetValueOrDefault(this.Identity), abstract1Field1: abstract1Field1.GetValueOrDefault(this.Abstract1Field1), abstract1Field2: abstract1Field2.GetValueOrDefault(this.Abstract1Field2), abstract2Field1: abstract2Field1.GetValueOrDefault(this.Abstract2Field1), abstract2Field2: abstract2Field2.GetValueOrDefault(this.Abstract2Field2), concreteField1: concreteField1.GetValueOrDefault(this.ConcreteField1), concreteField2: concreteField2.GetValueOrDefault(this.ConcreteField2))); } else { return(this); } }
public static Fruit Create( ImmutableObjectGraph.Optional <System.String> color = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.Int32> skinThickness = default(ImmutableObjectGraph.Optional <System.Int32>)) { return(DefaultInstance.With( color: color.GetValueOrDefault(DefaultInstance.Color), skinThickness: skinThickness.GetValueOrDefault(DefaultInstance.SkinThickness))); }
public static FileSystemDirectory Create( System.String pathSegment, ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableSortedSet <FileSystemEntry> > children = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableSortedSet <FileSystemEntry> >)) { return(DefaultInstance.With( pathSegment: pathSegment, children: children.GetValueOrDefault(DefaultInstance.Children))); }
public static Watch Create( ImmutableObjectGraph.Optional <System.String> color = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.Int32> size = default(ImmutableObjectGraph.Optional <System.Int32>)) { return(DefaultInstance.With( color: color.GetValueOrDefault(DefaultInstance.Color), size: size.GetValueOrDefault(DefaultInstance.Size))); }
public static B Create( ImmutableObjectGraph.Optional <System.Int32> field1 = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <System.Int32> field2 = default(ImmutableObjectGraph.Optional <System.Int32>)) { return(DefaultInstance.With( field1: field1.GetValueOrDefault(DefaultInstance.Field1), field2: field2.GetValueOrDefault(DefaultInstance.Field2))); }
public static FileSystemFile Create( System.String pathSegment, ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableHashSet <System.String> > attributes = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableHashSet <System.String> >)) { return(DefaultInstance.With( pathSegment: pathSegment, attributes: attributes.GetValueOrDefault(DefaultInstance.Attributes))); }
public override C2 ToC2( ImmutableObjectGraph.Optional <System.Int32> field2 = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <System.Int32> field3 = default(ImmutableObjectGraph.Optional <System.Int32>)) { return(base.ToC2( field2: field2.GetValueOrDefault(this.Field2), field3: field3)); }
public static Contact Create( ImmutableObjectGraph.Optional <System.String> name = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> email = default(ImmutableObjectGraph.Optional <System.String>)) { return(DefaultInstance.With( name: name.GetValueOrDefault(DefaultInstance.Name), email: email.GetValueOrDefault(DefaultInstance.Email))); }
public static ReqAndHierL1 Create( System.String l1Field2, ImmutableObjectGraph.Optional <System.String> l1Field1 = default(ImmutableObjectGraph.Optional <System.String>)) { return(DefaultInstance.With( l1Field1: l1Field1.GetValueOrDefault(DefaultInstance.L1Field1), l1Field2: l1Field2)); }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> protected virtual NonEmptyBase WithCore( ImmutableObjectGraph.Optional <System.Boolean> oneField = default(ImmutableObjectGraph.Optional <System.Boolean>)) { var identity = default(ImmutableObjectGraph.Optional <System.UInt32>); return(this.WithFactory( oneField: Optional.For(oneField.GetValueOrDefault(this.OneField)), identity: Optional.For(identity.GetValueOrDefault(this.Identity)))); }
public static A Create( ImmutableObjectGraph.Optional <System.Int32> field1 = default(ImmutableObjectGraph.Optional <System.Int32>)) { var identity = Optional.For(NewIdentity()); return(DefaultInstance.WithFactory( field1: Optional.For(field1.GetValueOrDefault(DefaultInstance.Field1)), identity: Optional.For(identity.GetValueOrDefault(DefaultInstance.Identity)))); }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> protected virtual Family WithCore( ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableSortedSet <Person> > members = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableSortedSet <Person> >)) { var identity = default(ImmutableObjectGraph.Optional <System.UInt32>); return(this.WithFactory( members: Optional.For(members.GetValueOrDefault(this.Members)), identity: Optional.For(identity.GetValueOrDefault(this.Identity)))); }
public static ContainerOfNonRecursiveCollection Create( ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <NonRecursiveElement> > metadata = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <NonRecursiveElement> >)) { var identity = Optional.For(NewIdentity()); return(DefaultInstance.WithFactory( metadata: Optional.For(metadata.GetValueOrDefault(DefaultInstance.Metadata)), identity: Optional.For(identity.GetValueOrDefault(DefaultInstance.Identity)))); }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> protected virtual A WithCore( ImmutableObjectGraph.Optional <System.Int32> field1 = default(ImmutableObjectGraph.Optional <System.Int32>)) { var identity = default(ImmutableObjectGraph.Optional <System.UInt32>); return(this.WithFactory( field1: Optional.For(field1.GetValueOrDefault(this.Field1)), identity: Optional.For(identity.GetValueOrDefault(this.Identity)))); }
public static EmptyDerivedFromAbstract Create( ImmutableObjectGraph.Optional <System.Boolean> oneField = default(ImmutableObjectGraph.Optional <System.Boolean>)) { var identity = Optional.For(NewIdentity()); return(DefaultInstance.WithFactory( oneField: Optional.For(oneField.GetValueOrDefault(DefaultInstance.OneField)), identity: Optional.For(identity.GetValueOrDefault(DefaultInstance.Identity)))); }
public static Family Create( ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableSortedSet <Person> > members = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableSortedSet <Person> >)) { var identity = Optional.For(NewIdentity()); return(DefaultInstance.WithFactory( members: Optional.For(members.GetValueOrDefault(DefaultInstance.Members)), identity: Optional.For(identity.GetValueOrDefault(DefaultInstance.Identity)))); }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> protected virtual ContainerOfNonRecursiveCollection WithCore( ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <NonRecursiveElement> > metadata = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <NonRecursiveElement> >)) { var identity = default(ImmutableObjectGraph.Optional <System.UInt32>); return(this.WithFactory( metadata: Optional.For(metadata.GetValueOrDefault(this.Metadata)), identity: Optional.For(identity.GetValueOrDefault(this.Identity)))); }
public static XmlAttribute Create( ImmutableObjectGraph.Optional <System.String> localName = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> namespaceName = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> value = default(ImmutableObjectGraph.Optional <System.String>)) { return(DefaultInstance.With( localName: localName.GetValueOrDefault(DefaultInstance.LocalName), namespaceName: namespaceName.GetValueOrDefault(DefaultInstance.NamespaceName), value: value.GetValueOrDefault(DefaultInstance.Value))); }
public static Person Create( System.String name, ImmutableObjectGraph.Optional <System.Int32> age = default(ImmutableObjectGraph.Optional <System.Int32>), ImmutableObjectGraph.Optional <Watch> watch = default(ImmutableObjectGraph.Optional <Watch>)) { return(DefaultInstance.With( name: name, age: age.GetValueOrDefault(DefaultInstance.Age), watch: watch.GetValueOrDefault(DefaultInstance.Watch))); }
public static XmlElement Create( ImmutableObjectGraph.Optional <System.String> localName = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> namespaceName = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <XmlNode> > children = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <XmlNode> >)) { return(DefaultInstance.With( localName: localName.GetValueOrDefault(DefaultInstance.LocalName), namespaceName: namespaceName.GetValueOrDefault(DefaultInstance.NamespaceName), children: children.GetValueOrDefault(DefaultInstance.Children))); }
public override XmlElementWithContent ToXmlElementWithContent( ImmutableObjectGraph.Optional <System.String> namespaceName = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <XmlNode> > children = default(ImmutableObjectGraph.Optional <System.Collections.Immutable.ImmutableList <XmlNode> >), ImmutableObjectGraph.Optional <System.String> content = default(ImmutableObjectGraph.Optional <System.String>)) { return(base.ToXmlElementWithContent( namespaceName: namespaceName.GetValueOrDefault(this.NamespaceName), children: children.GetValueOrDefault(this.Children), content: content)); }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> protected virtual ReqAndHierL1 WithCore( ImmutableObjectGraph.Optional <System.String> l1Field1 = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.String> l1Field2 = default(ImmutableObjectGraph.Optional <System.String>)) { var identity = default(ImmutableObjectGraph.Optional <System.UInt32>); return(this.WithFactory( l1Field1: Optional.For(l1Field1.GetValueOrDefault(this.L1Field1)), l1Field2: Optional.For(l1Field2.GetValueOrDefault(this.L1Field2)), identity: Optional.For(identity.GetValueOrDefault(this.Identity)))); }
public static ReqAndHierL1 Create( System.String l1Field2, ImmutableObjectGraph.Optional <System.String> l1Field1 = default(ImmutableObjectGraph.Optional <System.String>)) { var identity = Optional.For(NewIdentity()); return(DefaultInstance.WithFactory( l1Field1: Optional.For(l1Field1.GetValueOrDefault(DefaultInstance.L1Field1)), l1Field2: Optional.For(l1Field2), identity: Optional.For(identity.GetValueOrDefault(DefaultInstance.Identity)))); }
/// <summary>Returns a new instance of this object with any number of properties changed.</summary> protected virtual Watch WithCore( ImmutableObjectGraph.Optional <System.String> color = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.Int32> size = default(ImmutableObjectGraph.Optional <System.Int32>)) { var identity = default(ImmutableObjectGraph.Optional <System.UInt32>); return(this.WithFactory( color: Optional.For(color.GetValueOrDefault(this.Color)), size: Optional.For(size.GetValueOrDefault(this.Size)), identity: Optional.For(identity.GetValueOrDefault(this.Identity)))); }
private CustomerThrottleContext WithFactory(ImmutableObjectGraph.Optional <Banda.AsyncThrottledFunctionExecutor.CustomerThrottle> customerThrottle = default(ImmutableObjectGraph.Optional <Banda.AsyncThrottledFunctionExecutor.CustomerThrottle>), ImmutableObjectGraph.Optional <System.Object> tokenBucket = default(ImmutableObjectGraph.Optional <System.Object>), ImmutableObjectGraph.Optional <uint> identity = default(ImmutableObjectGraph.Optional <uint>)) { if ((identity.IsDefined && identity.Value != this.Identity) || (customerThrottle.IsDefined && customerThrottle.Value != this.CustomerThrottle) || (tokenBucket.IsDefined && tokenBucket.Value != this.TokenBucket)) { return(new CustomerThrottleContext(identity: identity.GetValueOrDefault(this.Identity), customerThrottle: customerThrottle.GetValueOrDefault(this.CustomerThrottle), tokenBucket: tokenBucket.GetValueOrDefault(this.TokenBucket), skipValidation: false)); } else { return(this); } }
public static Watch Create( ImmutableObjectGraph.Optional <System.String> color = default(ImmutableObjectGraph.Optional <System.String>), ImmutableObjectGraph.Optional <System.Int32> size = default(ImmutableObjectGraph.Optional <System.Int32>)) { var identity = Optional.For(NewIdentity()); return(DefaultInstance.WithFactory( color: Optional.For(color.GetValueOrDefault(DefaultInstance.Color)), size: Optional.For(size.GetValueOrDefault(DefaultInstance.Size)), identity: Optional.For(identity.GetValueOrDefault(DefaultInstance.Identity)))); }