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


C# EA.GetMethodByGuid方法代码示例

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


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

示例1: 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

示例2: save

 public override void save(EA.Repository rep, FindAndReplaceItem.FieldType fieldType)
 {
     EA.Method meth = rep.GetMethodByGuid(GUID);
     if ((fieldType & FindAndReplaceItem.FieldType.Description) > 0)
     { meth.Notes = _Description; }
     if ((fieldType & FindAndReplaceItem.FieldType.Name) > 0)
     {   meth.Name = _Name; }
     if ((fieldType & FindAndReplaceItem.FieldType.Stereotype) > 0)
     { meth.StereotypeEx = _Stereotype; }
     _isUpdated = true;
     meth.Update();
 }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:12,代码来源:FindAndReplaceItemMethod.cs

示例3: RunMethodRule

 public void RunMethodRule(EA.Repository Repository, string sRuleID, string MethodGUID, long ObjectID)
 {
     EA.Method method = Repository.GetMethodByGuid(MethodGUID);
     if (method != null)
     {
         switch (LookupMapEx(sRuleID))
         {
             case rule76:
                 DoRule76(Repository, method);
                 break;
             case rule77:
                 DoRule77(Repository, method);
                 break;
             case rule78:
                 DoRule78(Repository, method);
                 break;
             case rule79:
                 DoRule79_to_83(Repository, method, "Create");
                 break;
             case rule80:
                 DoRule79_to_83(Repository, method, "Read");
                 break;
             case rule81:
                 DoRule79_to_83(Repository, method, "Update");
                 break;
             case rule82:
                 DoRule79_to_83(Repository, method, "Delete");
                 break;
             case rule83:
                 DoRule79_to_83(Repository, method, "DeleteAll");
                 break;
             case rule84:
                 DoRule84(Repository, method);
                 break;
             case rule85:
                 DoRule85(Repository, method);
                 break;
             case rule86:
                 DoRule86(Repository, method);
                 break;
             case rule87:
                 DoRule87(Repository, method);
                 break;
             default:
                 break;
         }
     }
 }
开发者ID:theedward,项目名称:xis-mobile,代码行数:48,代码来源:Rules.cs

示例4: GetMethodFromMethodName

        public static EA.Method GetMethodFromMethodName(EA.Repository rep, string methodName)
        {
            EA.Method method = null;
            string query = @"select op.ea_guid AS EA_GUID
                      from t_operation op 
                      where op.name = '" + methodName + "' ";
            string str = rep.SQLQuery(query);
            var xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(str);

            XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//EA_GUID");
            if (operationGuidNode != null)
            {
                string guid = operationGuidNode.InnerText;
                method = rep.GetMethodByGuid(guid);
            }

            return method;
        }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:19,代码来源:Action.cs

示例5: FindAndReplaceItemMethod

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

示例6: GetOperationFromConnector


//.........这里部分代码省略.........
//               (!rep.ConnectionString.Contains(".eap")))// Access
//            {
//                query =
//                  @"select op.ea_guid AS EA_GUID
//                        from t_operation op 
//                        where op.Behaviour = '" + el.ElementGUID + "'";

//            }

//            string str = rep.SQLQuery(query);
//            XmlDocument XmlDoc = new XmlDocument();
//            XmlDoc.LoadXml(str);

//            XmlNode operationGUIDNode = XmlDoc.SelectSingleNode("//EA_GUID");
//            if (operationGUIDNode != null)
//            {
//                string GUID = operationGUIDNode.InnerText;
//                method = rep.GetMethodByGuid(GUID);
//            }
//            return method;
//        }



        public static Method GetOperationFromConnector(EA.Repository rep, EA.Connector con)
        {
            Method method = null;
            string query = "";
            if (GetConnectionString(rep).Contains("DBType=3"))
                //pdat3: 'Activity','Sequence', (..)
            {   // Oracle DB
                query =
                    @"select description AS EA_GUID
                      from t_xref x 
                      where Cast(x.client As Varchar2(38)) = '" + con.ConnectorGUID + "'" +
                                                                " AND Behavior = 'effect' ";
            }
            if (GetConnectionString(rep).Contains("DBType=1"))
            {   // SQL Server

                query =
                      @"select description AS EA_GUID
                        from t_xref x 
                        where Substring(x.client,1,38) = " + "'" + con.ConnectorGUID + "'" +
                           " AND Behavior = 'effect' "                   
                                          ;
            }
            if (GetConnectionString(rep).Contains(".eap"))
            {

                query =
                      @"select description AS EA_GUID
                        from t_xref x 
                        where client = " + "'" + con.ConnectorGUID + "'" +
                           " AND Behavior = 'effect' "
                                          ;
            }
            if ((! GetConnectionString(rep).Contains("DBType=1")) &&  // SQL Server, DBType=0 MySQL
                (! GetConnectionString(rep).Contains("DBType=3")) &&  // Oracle
                (! GetConnectionString(rep).Contains(".eap")))// Access
            {
                query =
                @"select description AS EA_GUID
                        from t_xref x 
                        where client = " + "'" + con.ConnectorGUID + "'" +
                             " AND Behavior = 'effect' "
                                            ;

            }


            string str = rep.SQLQuery(query);
            var xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(str);

            //string type = "";
            //XmlNode pdat3Node = XmlDoc.SelectSingleNode("//PDAT3");
            //if (pdat3Node != null)
            //{
            //    type = pdat3Node.InnerText;
                
            //}
            //if ( type.EndsWith(")")) // Operation
            //{ 
            string guid = null;
                XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//EA_GUID");
                if (operationGuidNode != null)
                {
                    guid = operationGuidNode.InnerText;
                    method = rep.GetMethodByGuid(guid);
                }
                if (method == null)
                {

                     if (guid != null) OpenBehaviorForElement(rep, rep.GetElementByGuid(guid));
                }
            //}

            return method;
        }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:101,代码来源:Util.cs

示例7: GetOperationFromBrehavior

        // Find the operation from Activity / State Machine
        // it excludes operations in state machines
        public static Method GetOperationFromBrehavior(EA.Repository rep, EA.Element el)
        {
            Method method = null;
            string query = "";
            string conString = GetConnectionString(rep); // due to shortcuts
            if (conString.Contains("DBType=3"))
            {   // Oracle DB
                query = 
                    @"select op.ea_guid AS EA_GUID
                      from t_operation op 
                      where Cast(op.Behaviour As Varchar2(38)) = '" + el.ElementGUID + "' "+
                            " AND (Type is Null or Type not in ('do','entry','exit'))";
            }
            if (conString.Contains("DBType=1"))
                // SQL Server
            {    query = 
                      @"select op.ea_guid AS EA_GUID
                        from t_operation op 
                        where Substring(op.Behaviour,1,38) = '" + el.ElementGUID + "'" +
                       " AND (Type is Null or Type not in ('do','entry','exit'))";

            }

            if (conString.Contains(".eap"))
                // SQL Server
            {     query = 
                      @"select op.ea_guid AS EA_GUID
                        from t_operation op 
                        where op.Behaviour = '" + el.ElementGUID + "'" +
                       " AND ( Type is Null or Type not in ('do','entry','exit'))";

            }
            if ((! conString.Contains("DBType=1")) &&  // SQL Server, DBType=0 MySQL
               (!  conString.Contains("DBType=3")) &&  // Oracle
               (!  conString.Contains(".eap")))// Access
            {
                query =
                  @"select op.ea_guid AS EA_GUID
                        from t_operation op 
                        where op.Behaviour = '" + el.ElementGUID + "'" +
                       " AND (Type is Null or Type not in ('do','entry','exit'))";

            }

            string str = rep.SQLQuery(query);
            var xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(str);

            XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//EA_GUID");
            if (operationGuidNode != null)
            {
                string guid = operationGuidNode.InnerText;
                method = rep.GetMethodByGuid(guid);
            }
            return method;
        }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:58,代码来源:Util.cs

示例8: GetOperationFromCallAction

        // Find the calling operation from a Call Operation Action
        public static Method GetOperationFromCallAction(EA.Repository rep, EA.Element obj)
        {
            string wildCard = GetWildCard(rep);
            string query = @"SELECT op.ea_guid AS OPERATION from (t_object o inner join t_operation op on (o.classifier_guid = op.ea_guid))
               inner join t_xref x on (x.client = o.ea_guid)
			   where x.name = 'CustomProperties' and
			             x.description like '"+ wildCard + "CallOperation" + wildCard + 
                         "' and o.object_id = " + obj.ElementID;
            string str = rep.SQLQuery(query);
            var xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(str);

            XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//OPERATION");
            if (operationGuidNode != null)
            {
                var guid = operationGuidNode.InnerText;
                return rep.GetMethodByGuid(guid);
            }
            return null;
        }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:21,代码来源:Util.cs

示例9: GetOperationFromAction

        // Find the calling operation from a Call Operation Action
        public static Method GetOperationFromAction(EA.Repository rep, EA.Element action)
        {
            Method method = null;
            string query = @"select o.Classifier_guid AS CLASSIFIER_GUID
                      from t_object o 
                      where o.Object_ID = " + action.ElementID;
            string str = rep.SQLQuery(query);
            var xmlDoc = new XmlDocument();
            xmlDoc.LoadXml(str);

            XmlNode operationGuidNode = xmlDoc.SelectSingleNode("//CLASSIFIER_GUID");
            if (operationGuidNode != null)
            {
                string guid = operationGuidNode.InnerText;
                method = rep.GetMethodByGuid(guid);
            }
            return method;
        }
开发者ID:Helmut-Ortmann,项目名称:EnterpriseArchitect_hoTools,代码行数:19,代码来源:Util.cs


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