public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
        {
            ViewFieldLov obj = value as ViewFieldLov;

            if (obj != null)
            {
                writer.WriteStartObject();
                {
                    HelperJsonConverter.WritePropertyValue("$id", HelperJsonConverter.GetReferenceInternal(obj), writer, serializer);
                    HelperJsonConverter.WritePropertyType <ViewFieldLov>(writer, serializer, obj);
                    HelperJsonConverter.WritePropertyReference("DependantProperty", obj.DependantProperty, writer, serializer);
                    HelperJsonConverter.WritePropertyReference("DependantViewFieldLOV", obj.DependantViewFieldLOV, writer, serializer);
                    HelperJsonConverter.WritePropertyReference("DisplayProperty", obj.DisplayProperty, writer, serializer);
                    HelperJsonConverter.WritePropertyReference("EntityInternal", obj.EntityInternal, writer, serializer);
                    HelperJsonConverter.WritePropertyObject <Link>("InLineLink", obj.InLineLink, writer, serializer);
                    HelperJsonConverter.WritePropertyObjectsArray("LovsInternal", typeof(List <Lov>), obj.LovsInternal, (objchild) =>
                    {
                        serializer.Serialize(writer, objchild);
                    }, writer, serializer);


                    HelperJsonConverter.WritePropertyValue("OrderLovType", obj.OrderLovType, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("RowLimit", obj.RowLimit, writer, serializer);
                    HelperJsonConverter.WritePropertyValuesArray("ShowPropertiesInternal", typeof(List <Guid>), obj.ShowPropertiesInternal, (objchild) =>
                    {
                        writer.WriteStartObject();
                        HelperJsonConverter.WritePropertyValue("$ref", objchild, writer, serializer);
                        writer.WriteEnd();
                    }, writer, serializer);


                    HelperJsonConverter.WritePropertyValue("SqlOrderBy", obj.SqlOrderBy, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("SqlWhere", obj.SqlWhere, writer, serializer);
                    HelperJsonConverter.WritePropertyReference("ValueProperty", obj.ValueProperty, writer, serializer);
                }
            }
        }
Example #2
0
        public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
        {
            WorkflowUICommand obj = value as WorkflowUICommand;

            if (obj != null)
            {
                writer.WriteStartObject();
                {
                    HelperJsonConverter.WritePropertyValue("$id", HelperJsonConverter.GetReferenceInternal(obj), writer, serializer);
                    HelperJsonConverter.WritePropertyType <WorkflowUICommand>(writer, serializer, obj);
                    HelperJsonConverter.WritePropertyObjectsArray("FormatsInternal", typeof(List <WorkflowUICommandFormat>), obj.FormatsInternal, (objchild) =>
                    {
                        HelperJsonConverter.WritePropertyValue("Height", objchild.Height, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("IsDefault", objchild.IsDefault, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("Name", objchild.Name, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("UIXml", objchild.UIXml, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("Width", objchild.Width, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("WorkflowUICommandFormatType", objchild.WorkflowUICommandFormatType, writer, serializer);
                    }, writer, serializer);
                    HelperJsonConverter.WritePropertyObjectsArray("FormalParametersInternal", typeof(List <WorkflowFormalParameter>), obj.FormalParametersInternal, (objchild) =>
                    {
                        HelperJsonConverter.WritePropertyReference("Attribute", objchild.Attribute, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("Description", objchild.Description, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("EntityStereotypeInternal", objchild.EntityStereotypeInternal, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("Index", objchild.Index, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("IsEditableParameter", objchild.IsEditableParameter, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("IsRequiredParameter", objchild.IsRequiredParameter, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("Mode", objchild.Mode, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("Name", objchild.Name, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("Stereotype", objchild.Stereotype, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("WorkflowFormalParameterType", objchild.WorkflowFormalParameterType, writer, serializer);
                    }, writer, serializer);
                    HelperJsonConverter.WritePropertyValuesArray("OptionsInternal", typeof(List <string>), obj.OptionsInternal, (objchild) =>
                    {
                        writer.WriteValue(objchild);
                    }, writer, serializer);
                    HelperJsonConverter.WritePropertyObjectsArray("ListsInternal", typeof(List <WorkflowUICommandList>), obj.ListsInternal, (objchild) =>
                    {
                        HelperJsonConverter.WritePropertyReference("DefaultValueParameterName", objchild.DefaultValueParameterName, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("Name", objchild.Name, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("NavigationAllowsNullSelection", objchild.NavigationAllowsNullSelection, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("NavigationNextOptionInternal", objchild.NavigationNextOptionInternal, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("NavigationNextPageOptionInternal", objchild.NavigationNextPageOptionInternal, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("NavigationNullSelectionText", objchild.NavigationNullSelectionText, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("NavigationOptionsExitsDialog", objchild.NavigationOptionsExitsDialog, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("NavigationPreviousOptionInternal", objchild.NavigationPreviousOptionInternal, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("NavigationPreviousPageOptionInternal", objchild.NavigationPreviousPageOptionInternal, writer, serializer);
                        HelperJsonConverter.WritePropertyReference("SelectedValueParameterName", objchild.SelectedValueParameterName, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("SelectOptionDisplayLabelText", objchild.SelectOptionDisplayLabelText, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("SelectOptionDisplayProperty", objchild.SelectOptionDisplayProperty, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("SelectOptionExitDialogOptionInternal", objchild.SelectOptionExitDialogOptionInternal, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("SelectOptionExitsDialog", objchild.SelectOptionExitsDialog, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("SelectOptionInternal", objchild.SelectOptionInternal, writer, serializer);
                        HelperJsonConverter.WritePropertyValue("SelectOptionOnlyList", objchild.SelectOptionOnlyList, writer, serializer);
                    }, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("CheckStatus", obj.CheckStatus, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("Description", obj.Description, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("IsSelector", obj.IsSelector, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("Name", obj.Name, writer, serializer);
                    HelperJsonConverter.WritePropertyReference("SelectorList", obj.SelectorList, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("ShowPromptDefaultValue", obj.ShowPromptDefaultValue, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("VersionId", obj.VersionId, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("WorkflowUICommandEditionKind", obj.WorkflowUICommandEditionKind, writer, serializer);
                    HelperJsonConverter.WritePropertyValue("WorkflowUICommandPromptTypeInternal", obj.WorkflowUICommandPromptTypeInternal, writer, serializer);
                }
            }
        }