public void CopyFrom (TModelAction alias) { if (alias.NotNull ()) { SettingsModel.CopyFrom (alias.SettingsModel); CategoryRelationModel.CopyFrom (alias.CategoryRelationModel); ComponentDescriptorModel.CopyFrom (alias.ComponentDescriptorModel); ComponentInfoModel.CopyFrom (alias.ComponentInfoModel); ComponentStatusModel.CopyFrom (alias.ComponentStatusModel); ComponentRelationModel.CopyFrom (alias.ComponentRelationModel); ExtensionGeometryModel.CopyFrom (alias.ExtensionGeometryModel); ExtensionImageModel.CopyFrom (alias.ExtensionImageModel); ExtensionLayoutModel.CopyFrom (alias.ExtensionLayoutModel); ExtensionNodeModel.CopyFrom (alias.ExtensionNodeModel); ExtensionTextModel.CopyFrom (alias.ExtensionTextModel); ExtensionContentModel.CopyFrom (alias.ExtensionContentModel); } }
public static TComponentModel Create (TModelAction modelAction) { var model = new TComponentModel (); if (modelAction.NotNull ()) { model.SettingsModel.CopyFrom (modelAction.SettingsModel); model.InfoModel.CopyFrom (modelAction.ComponentInfoModel); model.StatusModel.CopyFrom (modelAction.ComponentStatusModel); model.ImageModel.CopyFrom (modelAction.ExtensionImageModel); model.GeometryModel.CopyFrom (modelAction.ExtensionGeometryModel); model.LayoutModel.CopyFrom (modelAction.ExtensionLayoutModel); model.TextModel.CopyFrom (modelAction.ExtensionTextModel); model.NodeModel.CopyFrom (modelAction.ExtensionNodeModel); model.ContentModel.CopyFrom (modelAction.ExtensionContentModel); } return (model); }