コード例 #1
0
        /// <summary>
        /// Makes a duplicate of the current object
        /// </summary>
        /// <returns>The object duplicate</returns>
        public virtual MergedObjectType Clone()
        {
            var mergedObjectType = new MergedObjectType(this.OriginalTypeName);

            this.FillWithMyFields(mergedObjectType);
            return(mergedObjectType);
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MergedConnectionType"/> class.
 /// </summary>
 /// <param name="originalTypeName">
 /// The original type name.
 /// </param>
 /// <param name="provider">
 /// The provider.
 /// </param>
 /// <param name="elementType">
 /// The end Type.
 /// </param>
 public MergedConnectionType(string originalTypeName, ApiProvider provider, MergedObjectType elementType)
     : base(originalTypeName)
 {
     this.ElementType = elementType;
     this.Provider    = provider;
     this.EdgeType    = new MergedEdgeType(this.OriginalTypeName, provider, this.ElementType);
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MergedConnectionMutationResultType"/> class.
 /// </summary>
 /// <param name="nodeType">
 /// The node type.
 /// </param>
 /// <param name="root">
 /// The root.
 /// </param>
 /// <param name="errorType">
 /// The error type.
 /// </param>
 /// <param name="provider">
 /// The provider.
 /// </param>
 public MergedConnectionMutationResultType(
     MergedObjectType nodeType,
     MergedApiRoot root,
     MergedType errorType,
     ApiProvider provider)
     : base(nodeType.OriginalTypeName)
 {
     this.EdgeType  = new MergedEdgeType(nodeType.OriginalTypeName, provider, nodeType);
     this.root      = root;
     this.ErrorType = errorType;
     this.Provider  = provider;
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MergedEdgeType"/> class.
 /// </summary>
 /// <param name="originalTypeName">
 /// The original type name.
 /// </param>
 /// <param name="provider">
 /// The provider.
 /// </param>
 /// <param name="objectType">
 /// The end Type.
 /// </param>
 public MergedEdgeType(string originalTypeName, ApiProvider provider, MergedObjectType objectType) : base(originalTypeName)
 {
     this.ObjectType = objectType;
     this.Provider   = provider;
 }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NodeResolver"/> class.
 /// </summary>
 /// <param name="originalType">
 /// The original type.
 /// </param>
 public NodeResolver(MergedObjectType originalType)
 {
     this.originalType = originalType;
 }
コード例 #6
0
 /// <summary>
 /// Fills the empty object with current objects fields
 /// </summary>
 /// <param name="shell">The empty object to fill</param>
 protected virtual void FillWithMyFields(MergedObjectType shell)
 {
     shell.AddProviders(this.providers);
     shell.Fields   = this.Fields.ToDictionary(p => p.Key, p => p.Value.Clone());
     shell.Category = this.Category;
 }
コード例 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NodeResolver"/> class.
 /// </summary>
 /// <param name="nodeType">
 /// The original node type.
 /// </param>
 public NodeResolver(MergedObjectType nodeType)
 {
     this.nodeType = nodeType;
 }