Ejemplo n.º 1
0
        /// <summary>
        /// Method to supply the name for ModelElementTreeNode object in the TreeView.
        /// </summary>
        /// <param name="modelElement">Element to be displayed in the tree node</param>
        /// <returns>Name shown in the Model Explorer</returns>
        private string GetModelElementDisplayName(DslModeling::ModelElement modelElement)
        {
            string treeNodeDisplayName = null;
            DslModeling::DomainDataDirectory directory          = modelElement.Store.DomainDataDirectory;
            DslModeling::DomainPropertyInfo  domainPropertyInfo = null;
            DslModeling::ModelElement        redirectedElement  = null;

            switch (modelElement.GetDomainClass().Id.ToString("D", System.Globalization.CultureInfo.InvariantCulture))
            {
            case "3d71fb67-1375-4f99-8206-12a78e514a4a":                        // AggregateIdentifier.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::CQRSAzure.CQRSdsl.Dsl.AggregateIdentifier.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "a88729a0-1121-458a-b5c7-32ef0714b62a":                        // EventDefinition.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::CQRSAzure.CQRSdsl.Dsl.EventDefinition.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "feed9883-9553-42cc-8b70-12dcd5032804":                        // CommandDefinition.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::CQRSAzure.CQRSdsl.Dsl.CommandDefinition.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "a506bd6f-43f3-44ea-b88e-66d3aaa85077":                        // ProjectionDefinition.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::CQRSAzure.CQRSdsl.Dsl.ProjectionDefinition.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "4b891bb8-8eb6-41d0-8d6a-79125b91b74b":                        // QueryDefinition.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::CQRSAzure.CQRSdsl.Dsl.QueryDefinition.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;
            }

            if (domainPropertyInfo != null && redirectedElement != null)
            {
                // Get the name based on the designated domian property
                treeNodeDisplayName = domainPropertyInfo.GetValue(redirectedElement) as string;
            }
            else
            {
                // The passed in modelElement does not have a DomainPath specified. Try access the default name from the element.
                DslModeling::DomainClassInfo.TryGetName(modelElement, out treeNodeDisplayName);
            }
            return(treeNodeDisplayName);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Method to supply the name for ModelElementTreeNode object in the TreeView.
        /// </summary>
        /// <param name="modelElement">Element to be displayed in the tree node</param>
        /// <returns>Name shown in the Model Explorer</returns>
        private string GetModelElementDisplayName(DslModeling::ModelElement modelElement)
        {
            string treeNodeDisplayName = null;
            DslModeling::DomainDataDirectory directory          = modelElement.Store.DomainDataDirectory;
            DslModeling::DomainPropertyInfo  domainPropertyInfo = null;
            DslModeling::ModelElement        redirectedElement  = null;

            switch (modelElement.GetDomainClass().Id.ToString("D", System.Globalization.CultureInfo.InvariantCulture))
            {
            case "eaad73c4-a652-4596-b575-39e82c2f525a":                        // Concept.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::Bb.ApplicationCooperationViewPoint.Concept.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "3aba6490-0175-4397-b4b4-8ba4dd8df1d1":                        // ConceptElement.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::Bb.ApplicationCooperationViewPoint.ConceptElement.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "a3a13452-14ee-4fe8-adcb-fd5c2f06ff68":                        // ConceptSubElement.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::Bb.ApplicationCooperationViewPoint.ConceptSubElement.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "403a7c63-3a36-4881-b0d5-0eaf0dcad50e":                        // ModelElement.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::Bb.ApplicationCooperationViewPoint.ModelElement.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "e39ae37f-7927-4be7-a99c-94d0deb846f7":                        // SubElement.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::Bb.ApplicationCooperationViewPoint.SubElement.NameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;
            }

            if (domainPropertyInfo != null && redirectedElement != null)
            {
                // Get the name based on the designated domian property
                treeNodeDisplayName = domainPropertyInfo.GetValue(redirectedElement) as string;
            }
            else
            {
                // The passed in modelElement does not have a DomainPath specified. Try access the default name from the element.
                DslModeling::DomainClassInfo.TryGetName(modelElement, out treeNodeDisplayName);
            }
            return(treeNodeDisplayName);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Method to supply the name for ModelElementTreeNode object in the TreeView.
        /// </summary>
        /// <param name="modelElement">Element to be displayed in the tree node</param>
        /// <returns>Name shown in the Model Explorer</returns>
        private string GetModelElementDisplayName(DslModeling::ModelElement modelElement)
        {
            string treeNodeDisplayName = null;
            DslModeling::DomainDataDirectory directory          = modelElement.Store.DomainDataDirectory;
            DslModeling::DomainPropertyInfo  domainPropertyInfo = null;
            DslModeling::ModelElement        redirectedElement  = null;

            switch (modelElement.GetDomainClass().Id.ToString("D", System.Globalization.CultureInfo.InvariantCulture))
            {
            case "8022b63d-c856-4a0e-9881-c24888e718c5":                        // EntityMetadata.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::nHydrate.Dsl.EntityMetadata.KeyDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "e4d98918-02cc-4cb0-94fc-2da89080f5be":                        // FieldMetadata.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::nHydrate.Dsl.FieldMetadata.KeyDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "ced4ceba-e07d-4396-b2fe-a981c60933d0":                        // Index.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::nHydrate.Dsl.Index.DefinitionDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;

            case "06e94c72-d866-4c92-b5a9-624fdbebdf9e":                        // IndexColumn.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::nHydrate.Dsl.IndexColumn.DefinitionDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;
            }

            if (domainPropertyInfo != null && redirectedElement != null)
            {
                // Get the name based on the designated domian property
                treeNodeDisplayName = domainPropertyInfo.GetValue(redirectedElement) as string;
            }
            else
            {
                // The passed in modelElement does not have a DomainPath specified. Try access the default name from the element.
                DslModeling::DomainClassInfo.TryGetName(modelElement, out treeNodeDisplayName);
            }
            return(treeNodeDisplayName);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Method to supply the name for ModelElementTreeNode object in the TreeView.
        /// </summary>
        /// <param name="modelElement">Element to be displayed in the tree node</param>
        /// <returns>Name shown in the Model Explorer</returns>
        private string GetModelElementDisplayName(DslModeling::ModelElement modelElement)
        {
            string treeNodeDisplayName = null;
            DslModeling::DomainDataDirectory directory          = modelElement.Store.DomainDataDirectory;
            DslModeling::DomainPropertyInfo  domainPropertyInfo = null;
            DslModeling::ModelElement        redirectedElement  = null;

            switch (modelElement.GetDomainClass().Id.ToString("D", System.Globalization.CultureInfo.InvariantCulture))
            {
            case "e2c13b26-0944-4b6c-89b5-bb95c500f515":                // Comment.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::Sawczyn.EFDesigner.EFModel.Comment.ShortTextDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;
            }

            if (domainPropertyInfo != null && redirectedElement != null)
            {
                // Get the name based on the designated domian property
                treeNodeDisplayName = domainPropertyInfo.GetValue(redirectedElement) as string;
            }
            else
            {
                // The passed in modelElement does not have a DomainPath specified. Try access the default name from the element.
                DslModeling::DomainClassInfo.TryGetName(modelElement, out treeNodeDisplayName);
            }
            return(treeNodeDisplayName);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Method to supply the name for ModelElementTreeNode object in the TreeView.
        /// </summary>
        /// <param name="modelElement">Element to be displayed in the tree node</param>
        /// <returns>Name shown in the Model Explorer</returns>
        private string GetModelElementDisplayName(DslModeling::ModelElement modelElement)
        {
            string treeNodeDisplayName = null;
            DslModeling::DomainDataDirectory directory          = modelElement.Store.DomainDataDirectory;
            DslModeling::DomainPropertyInfo  domainPropertyInfo = null;
            DslModeling::ModelElement        redirectedElement  = null;

            switch (modelElement.GetDomainClass().Id.ToString("D", System.Globalization.CultureInfo.InvariantCulture))
            {
            case "6881cfb0-e300-4d8b-8343-e1824c44c35a":                        // DomainType.DomainClassId
            {
                domainPropertyInfo = directory.FindDomainProperty(global::TXSoftware.DataObjectsNetEntityModel.Dsl.DomainType.FullNameDomainPropertyId);
                redirectedElement  = modelElement;
            }
            break;
            }

            if (domainPropertyInfo != null && redirectedElement != null)
            {
                // Get the name based on the designated domian property
                treeNodeDisplayName = domainPropertyInfo.GetValue(redirectedElement) as string;
            }
            else
            {
                // The passed in modelElement does not have a DomainPath specified. Try access the default name from the element.
                DslModeling::DomainClassInfo.TryGetName(modelElement, out treeNodeDisplayName);
            }
            return(treeNodeDisplayName);
        }