当前位置: 首页>>代码示例>>C#>>正文


C# EA.GetAttributeByGuid方法代码示例

本文整理汇总了C#中EA.GetAttributeByGuid方法的典型用法代码示例。如果您正苦于以下问题:C# EA.GetAttributeByGuid方法的具体用法?C# EA.GetAttributeByGuid怎么用?C# EA.GetAttributeByGuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EA的用法示例。


在下文中一共展示了EA.GetAttributeByGuid方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: load

 public override void load(EA.Repository rep)
 {
     _attr = rep.GetAttributeByGuid(GUID);
     _Name = _attr.Name;
     _Description = _attr.Notes;
     _Stereotype = _attr.StereotypeEx;
  
 }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:8,代码来源:FindAndReplaceItemAttribute.cs

示例2: showObjectProperties

 public void showObjectProperties(EA.Repository Repository, string GUID, EA.ObjectType ot)
 {
     eaObjectType.Text = ot.ToString();
     eaObjectName.Text = "?";
     switch(ot)
     {
         case EA.ObjectType.otAttribute:
             EA.Attribute attribute = Repository.GetAttributeByGuid(GUID);
             currentEaObject = attribute;
             currentEaObjectCollections = null;
             eaObjectName.Text = attribute.Name;
             showEmbeddedObjects.Enabled = false;
             showEmbeddedObjects.Checked = false;
             break;
         case EA.ObjectType.otElement:
             EA.Element element = Repository.GetElementByGuid(GUID);
             currentEaObject = element;
             currentEaObjectCollections = new EAElementCollections(element);
             eaObjectName.Text = element.Name;
             showEmbeddedObjects.Enabled = true;
             break;
         case EA.ObjectType.otMethod:
             EA.Method method = Repository.GetMethodByGuid(GUID);
             currentEaObject = method;
             currentEaObjectCollections = null;
             eaObjectName.Text = method.Name;
             showEmbeddedObjects.Enabled = false;
             showEmbeddedObjects.Checked = false;
             break;
         case EA.ObjectType.otPackage:
             EA.Package package = Repository.GetPackageByGuid(GUID);
             currentEaObject = package;
             currentEaObjectCollections = new EAPackageCollections(package);
             eaObjectName.Text = package.Name;
             showEmbeddedObjects.Enabled = true;
             break;
         case EA.ObjectType.otConnector:
             EA.Connector connector = Repository.GetConnectorByGuid(GUID);
             currentEaObject = connector;
             currentEaObjectCollections = null;
             showEmbeddedObjects.Enabled = false;
             showEmbeddedObjects.Checked = false;
             break;
         default:
             currentEaObject = null;
             currentEaObjectCollections = null;
             propertyGrid.SelectedObject = null;
             showEmbeddedObjects.Enabled = false;
             showEmbeddedObjects.Checked = false;
             break;
     }
     SynchPropertyGridSelection();
 }
开发者ID:makulik,项目名称:EA-Explorer,代码行数:53,代码来源:EAExplorerControl.cs

示例3: changeAttributeVisibility

        /// <summary>
        /// method changes scope of attribute
        /// </summary>
        /// <param name="Repository">EA repository</param>
        /// <param name="attributeGUID">GUID of changed attribute</param>
        /// <param name="scope">new scope of changed attribute</param>
        /// <param name="oldScope">previous scope of changed attribute</param>
        public void changeAttributeVisibility(EA.Repository Repository, string attributeGUID, string scope, string oldScope)
        {
            EA.Attribute attribute = (EA.Attribute)Repository.GetAttributeByGuid(attributeGUID);
            attribute.Visibility = scope;
            attribute.Update();

            EA.Element element = (EA.Element)Repository.GetElementByID(attribute.ParentID);

            BPAddIn.synchronizationWindow.addToList("Change of scope of attribute '" +
               attribute.Name + "' - previous scope: '" + oldScope + "', current scope: '" + scope +
               "' (Attribute of element '" + element.Name + "', location of element: " + itemTypes.getLocationOfItem(Repository, element.PackageID, element.ParentID));
        }
开发者ID:JOndik,项目名称:SmallTEAmsHelper,代码行数:19,代码来源:SynchronizationChanges.cs

示例4: deleteAttribute

        /// <summary>
        /// method deletes attribute from element
        /// </summary>
        /// <param name="Repository">EA repository</param>
        /// <param name="attributeGUID">GUID of attribute that should be deleted</param>
        public void deleteAttribute(EA.Repository Repository, string attributeGUID)
        {
            EA.Attribute attribute = (EA.Attribute)Repository.GetAttributeByGuid(attributeGUID);
            string name = attribute.Name;
            EA.Element element = (EA.Element)Repository.GetElementByID(attribute.ParentID);

            for (short i = 0; i < element.Attributes.Count; i++)
            {
                EA.Attribute actualAttribute = (EA.Attribute)element.Attributes.GetAt(i);
                if (actualAttribute.AttributeGUID == attributeGUID)
                {
                    element.Attributes.DeleteAt(i, false);
                    break;
                }
            }
            element.Attributes.Refresh();

            BPAddIn.synchronizationWindow.addToList("Deletion of attribute '" + name + "' from element '" + element.Name
                + "' (Location of element: " + itemTypes.getLocationOfItem(Repository, element.PackageID, element.ParentID));
        }
开发者ID:JOndik,项目名称:SmallTEAmsHelper,代码行数:25,代码来源:SynchronizationDeletions.cs

示例5: RunAttributeRule

 public void RunAttributeRule(EA.Repository Repository, string sRuleID, string AttributeGUID, long ObjectID)
 {
     EA.Attribute Attribute = Repository.GetAttributeByGuid(AttributeGUID);
     if (Attribute != null)
     {
         switch (LookupMapEx(sRuleID))
         {
             case rule12:
                 DoRule12(Repository, Attribute);
                 break;
             default:
                 break;
         }
     }
 }
开发者ID:theedward,项目名称:xis-mobile,代码行数:15,代码来源:Rules.cs

示例6: FindAndReplaceItemAttribute

 public  FindAndReplaceItemAttribute(EA.Repository rep, string GUID)  :base(rep, GUID)
 {
     this._attr = rep.GetAttributeByGuid(GUID);
     this.load(rep);
 }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:5,代码来源:FindAndReplaceItemAttribute.cs


注:本文中的EA.GetAttributeByGuid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。