コード例 #1
0
        public FieldLink Add(FieldLinkCreationInformation parameters)
        {
            ClientRuntimeContext context = base.Context;

            if (base.Context.ValidateOnClient)
            {
                if (parameters == null)
                {
                    throw ClientUtility.CreateArgumentNullException("parameters");
                }
                if (parameters != null && parameters.Field == null)
                {
                    throw ClientUtility.CreateArgumentNullException("parameters.Field");
                }
            }
            FieldLink fieldLink = new FieldLink(context, new ObjectPathMethod(context, base.Path, "Add", new object[]
            {
                parameters
            }));

            fieldLink.Path.SetPendingReplace();
            ObjectIdentityQuery objectIdentityQuery = new ObjectIdentityQuery(fieldLink.Path);

            context.AddQueryIdAndResultObject(objectIdentityQuery.Id, fieldLink);
            context.AddQuery(objectIdentityQuery);
            base.AddChild(fieldLink);
            fieldLink.InitFromCreationInformation(parameters);
            return(fieldLink);
        }
コード例 #2
0
 internal void InitFromCreationInformation(FieldLinkCreationInformation creation)
 {
 }