/// <summary>
        /// Execute the <see cref="CreateIndependentParameterTypeCommand"/>
        /// </summary>
        private void ExecuteCreateIndependentParameterType()
        {
            var assignment = new IndependentParameterTypeAssignment();

            var row = new IndependentParameterTypeAssignmentRowViewModel(assignment, string.Empty, this.Session, this);

            this.IndependentParameterTypes.Add(row);
        }
Beispiel #2
0
        /// <summary>
        /// Serialize the <see cref="IndependentParameterTypeAssignment"/>
        /// </summary>
        /// <param name="independentParameterTypeAssignment">The <see cref="IndependentParameterTypeAssignment"/> to serialize</param>
        /// <returns>The <see cref="JObject"/></returns>
        private JObject Serialize(IndependentParameterTypeAssignment independentParameterTypeAssignment)
        {
            var jsonObject = new JObject();

            jsonObject.Add("classKind", this.PropertySerializerMap["classKind"](Enum.GetName(typeof(CDP4Common.CommonData.ClassKind), independentParameterTypeAssignment.ClassKind)));
            jsonObject.Add("excludedDomain", this.PropertySerializerMap["excludedDomain"](independentParameterTypeAssignment.ExcludedDomain.OrderBy(x => x, this.guidComparer)));
            jsonObject.Add("excludedPerson", this.PropertySerializerMap["excludedPerson"](independentParameterTypeAssignment.ExcludedPerson.OrderBy(x => x, this.guidComparer)));
            jsonObject.Add("iid", this.PropertySerializerMap["iid"](independentParameterTypeAssignment.Iid));
            jsonObject.Add("measurementScale", this.PropertySerializerMap["measurementScale"](independentParameterTypeAssignment.MeasurementScale));
            jsonObject.Add("modifiedOn", this.PropertySerializerMap["modifiedOn"](independentParameterTypeAssignment.ModifiedOn));
            jsonObject.Add("parameterType", this.PropertySerializerMap["parameterType"](independentParameterTypeAssignment.ParameterType));
            jsonObject.Add("revisionNumber", this.PropertySerializerMap["revisionNumber"](independentParameterTypeAssignment.RevisionNumber));
            jsonObject.Add("thingPreference", this.PropertySerializerMap["thingPreference"](independentParameterTypeAssignment.ThingPreference));
            return(jsonObject);
        }