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


C# EA.GetProjectInterface方法代码示例

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


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

示例1: DoRule46

        private void DoRule46(EA.Repository Repository, EA.Element Element)
        {
            if (Element.Type == "Class" && Element.Stereotype == "XisMenu")
            {
                if (Element.Elements.Count > 0)
                {
                    EA.Element el = null;

                    for (short i = 0; i < Element.Elements.Count; i++)
                    {
                        el = Element.Elements.GetAt(i);

                        if (el.Stereotype != "XisMenuItem" && el.Stereotype != "XisMenuGroup" && el.Stereotype != "XisVisibilityBoundary")
                        {
                            EA.Project Project = Repository.GetProjectInterface();
                            Project.PublishResult(LookupMap(rule46), EA.EnumMVErrorType.mvError, GetRuleStr(rule46));
                            isValid = false;
                            break;
                        }
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:23,代码来源:Rules.cs

示例2: DoRule09

        private void DoRule09(EA.Repository Repository, EA.Connector Connector)
        {
            EA.Project Project = Repository.GetProjectInterface();
            EA.Element client = Repository.GetElementByID(Connector.ClientID);
            EA.Element supplier = Repository.GetElementByID(Connector.SupplierID);

            if (Connector.Stereotype == "XisEntityInheritance"
                && (client.Stereotype != "XisEntity" || supplier.Stereotype != "XisEntity"))
            {
                Project.PublishResult(LookupMap(rule09), EA.EnumMVErrorType.mvError, GetRuleStr(rule09));
                isValid = false;
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:13,代码来源:Rules.cs

示例3: DoRule109

        private void DoRule109(EA.Repository Repository, EA.Package Package)
        {
            if (Package.StereotypeEx == "UseCases View")
            {
                if (Package.Diagrams.Count > 0)
                {
                    if (Package.Diagrams.Count == 1)
                    {
                        EA.Diagram diagram = Package.Diagrams.GetAt(0);

                        if (diagram.MetaType != "XIS-Mobile_Diagrams::UseCasesViewModel")
                        {
                            EA.Project Project = Repository.GetProjectInterface();
                            Project.PublishResult(LookupMap(rule109), EA.EnumMVErrorType.mvError, GetRuleStr(rule109));
                            isValid = false;
                        }
                    }
                    else
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        Project.PublishResult(LookupMap(rule109), EA.EnumMVErrorType.mvError, GetRuleStr(rule109));
                        isValid = false;
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:26,代码来源:Rules.cs

示例4: DoRule96_97


//.........这里部分代码省略.........
                                    assoc = conn;
                                    break;
                                }
                            }

                            if (assoc != null)
                            {
                                EA.Element be = Repository.GetElementByID(assoc.SupplierID);
                                bool hasEntity = false;

                                if (be.Stereotype == "XisBusinessEntity" && be.Connectors.Count > 0)
                                {
                                    EA.Element entity = null;

                                    for (short i = 0; i < be.Connectors.Count; i++)
                                    {
                                        conn = be.Connectors.GetAt(i);

                                        if (conn.Stereotype == "XisBE-EntityMasterAssociation"
                                            || conn.Stereotype == "XisBE-EntityDetailAssociation"
                                            || conn.Stereotype == "XisBE-EntityReferenceAssociation")
                                        {
                                            entity = Repository.GetElementByID(conn.SupplierID);

                                            if (entity.Type == "Class" && entity.Stereotype == "XisEntity"
                                                && entity.Name == values[0])
                                            {
                                                hasEntity = true;
                                                break;
                                            }
                                        }
                                    }

                                    if (hasEntity && entity.Attributes.Count > 0)
                                    {
                                        bool attrExists = false;
                                        EA.Attribute attr = null;

                                        for (short i = 0; i < entity.Attributes.Count; i++)
                                        {
                                            attr = entity.Attributes.GetAt(i);

                                            if (attr.Stereotype == "XisEntityAttribute" && attr.Name == values[1])
                                            {
                                                attrExists = true;
                                                break;
                                            }
                                        }

                                        if (!attrExists)
                                        {
                                            publishResult = true;
                                        }
                                    }
                                    else
                                    {
                                        publishResult = true;
                                    }
                                }
                                else
                                {
                                    publishResult = true;
                                }
                            }
                            else
                            {
                                publishResult = true;
                            }
                        }
                        else
                        {
                            publishResult = true;
                        }
                    }
                    else
                    {
                        publishResult = true;
                    }

                    if (publishResult)
                    {
                        EA.Project Project = Repository.GetProjectInterface();

                        switch (filter)
                        {
                            case "searchBy":
                                Project.PublishResult(LookupMap(rule96), EA.EnumMVErrorType.mvError, GetRuleStr(rule96));
                                isValid = false;
                                break;
                            case "orderBy":
                                Project.PublishResult(LookupMap(rule97), EA.EnumMVErrorType.mvError, GetRuleStr(rule97));
                                isValid = false;
                                break;
                            default:
                                break;
                        }
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:101,代码来源:Rules.cs

示例5: DoRule01_to_04

        // Validate number of views
        private void DoRule01_to_04(EA.Repository Repository, EA.Package Package)
        {
            EA.Project Project = Repository.GetProjectInterface();
            EA.Package model = (EA.Package)Repository.Models.GetAt(0);
            EA.Package view = (EA.Package)model.Packages.GetAt(0);

            if (view.PackageID == Package.PackageID)
            {
                if (view.Packages.Count < 3)
                {
                    Project.PublishResult(LookupMap(rule01), EA.EnumMVErrorType.mvError, GetRuleStr(rule01));
                    isValid = false;
                }
                else if (view.Packages.Count == 3)
                {
                    EA.Package p = null;
                    bool arch = false;
                    Dictionary<string, int> smart = new Dictionary<string, int>(3);

                    for (short i = 0; i < view.Packages.Count; i++)
                    {
                        p = view.Packages.GetAt(i);

                        if (p.StereotypeEx == "Architectural View")
                        {
                            arch = true;
                            break;
                        }
                        else if (p.StereotypeEx == "BusinessEntities View" || p.StereotypeEx == "Domain View"
                                 || p.StereotypeEx == "UseCases View")
                        {
                            if (smart.ContainsKey(p.StereotypeEx))
                            {
                                smart[p.StereotypeEx] += 1;
                            }
                            else
                            {
                                smart.Add(p.StereotypeEx, 1);
                            }
                        }
                    }

                    if (arch)
                    {
                        Project.PublishResult(LookupMap(rule01), EA.EnumMVErrorType.mvError, GetRuleStr(rule02));
                        isValid = false;
                    }
                    else
                    {
                        if (!smart.ContainsKey("BusinessEntities View") || !smart.ContainsKey("Domain View")
                            || !smart.ContainsKey("UseCases View")
                            || smart["BusinessEntities View"] != 1 || smart["Domain View"] != 1 || smart["UseCases View"] != 1)
                        {
                            Project.PublishResult(LookupMap(rule01), EA.EnumMVErrorType.mvError, GetRuleStr(rule01));
                            isValid = false;
                        }
                    }
                }
                else
                {
                    EA.Package p = null;
                    bool arch = false;
                    Dictionary<string, int> dummy = new Dictionary<string, int>(5);

                    for (short i = 0; i < view.Packages.Count; i++)
                    {
                        p = view.Packages.GetAt(i);

                        if (p.StereotypeEx == "Architectural View")
                        {
                            arch = true;
                            if (dummy.ContainsKey(p.StereotypeEx))
                            {
                                dummy[p.StereotypeEx] += 1;
                            }
                            else
                            {
                                dummy.Add(p.StereotypeEx, 1);
                            }
                        }
                        else if (p.StereotypeEx == "BusinessEntities View" || p.StereotypeEx == "Domain View"
                                 || p.StereotypeEx == "InteractionSpace View" || p.StereotypeEx == "NavigationSpace View")
                        {
                            if (dummy.ContainsKey(p.StereotypeEx))
                            {
                                dummy[p.StereotypeEx] += 1;
                            }
                            else
                            {
                                dummy.Add(p.StereotypeEx, 1);
                            }
                        }
                    }

                    if (arch && (!dummy.ContainsKey("BusinessEntities View")
                        || !dummy.ContainsKey("Domain View") || !dummy.ContainsKey("InteractionSpace View")
                        || !dummy.ContainsKey("NavigationSpace View") || dummy["Architectural View"] != 1
                        || dummy["BusinessEntities View"] != 1 || dummy["Domain View"] != 1
                        || dummy["InteractionSpace View"] != 1 || dummy["NavigationSpace View"] != 1))
//.........这里部分代码省略.........
开发者ID:theedward,项目名称:xis-mobile,代码行数:101,代码来源:Rules.cs

示例6: DoRule87

        private void DoRule87(EA.Repository Repository, EA.Method method)
        {
            if (method.Stereotype == "XisAction")
            {
                string type = M2MTransformer.GetMethodTag(method.TaggedValues, "type").Value;

                if (type == "Navigate")
                {
                    string navigation = M2MTransformer.GetMethodTag(method.TaggedValues, "navigation").Value;

                    if (!string.IsNullOrEmpty(navigation))
                    {
                        EA.Package model = Repository.GetPackageByID(Repository.GetElementByID(method.ParentID).PackageID);
                        EA.Package interaction = null;

                        if (model.StereotypeEx == "InteractionSpace View")
                        {
                            interaction = model;
                        }

                        if (interaction != null)
                        {
                            EA.Element el = null;
                            bool exists = false;

                            for (short i = 0; i < interaction.Elements.Count; i++)
                            {
                                el = interaction.Elements.GetAt(i);

                                if (el.Type == "Class" && el.Stereotype == "XisInteractionSpace" && el.Name == navigation)
                                {
                                    exists = true;
                                    break;
                                }
                            }

                            if (!exists)
                            {
                                EA.Project Project = Repository.GetProjectInterface();
                                Project.PublishResult(LookupMap(rule87), EA.EnumMVErrorType.mvError, GetRuleStr(rule87));
                                isValid = false;
                            }
                        }
                        else
                        {
                            EA.Project Project = Repository.GetProjectInterface();
                            Project.PublishResult(LookupMap(rule87), EA.EnumMVErrorType.mvError, GetRuleStr(rule87));
                            isValid = false;
                        }
                    }
                    else
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        Project.PublishResult(LookupMap(rule87), EA.EnumMVErrorType.mvError, GetRuleStr(rule87));
                        isValid = false;
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:59,代码来源:Rules.cs

示例7: DoRule89_to_93


//.........这里部分代码省略.........
                                    }
                                }
                            }
                        }
                    }

                    if (space != null)
                    {
                        for (short i = 0; i < space.Connectors.Count; i++)
                        {
                            conn = space.Connectors.GetAt(i);

                            if (conn.Stereotype == "XisIS-BEAssociation")
                            {
                                assoc = conn;
                                break;
                            }
                        }

                        if (assoc != null)
                        {
                            EA.Element be = Repository.GetElementByID(assoc.SupplierID);
                            bool hasEntity = false;

                            if (be.Stereotype == "XisBusinessEntity" && be.Connectors.Count > 0)
                            {
                                EA.Element entity = null;

                                for (short i = 0; i < be.Connectors.Count; i++)
                                {
                                    conn = be.Connectors.GetAt(i);

                                    if (conn.Stereotype == "XisBE-EntityMasterAssociation"
                                        || conn.Stereotype == "XisBE-EntityDetailAssociation"
                                        || conn.Stereotype == "XisBE-EntityReferenceAssociation")
                                    {
                                        entity = Repository.GetElementByID(conn.SupplierID);

                                        if (entity.Type == "Class" && entity.Stereotype == "XisEntity"
                                            && entity.Name == entityName)
                                        {
                                            hasEntity = true;
                                            break;
                                        }
                                    }
                                }

                                if (!hasEntity)
                                {
                                    publishResult = true;
                                }
                            }
                            else
                            {
                                publishResult = true;
                            }
                        }
                        else
                        {
                            publishResult = true;
                        }
                    }
                    else
                    {
                        publishResult = true;
                    }

                    if (publishResult)
                    {
                        EA.Project Project = Repository.GetProjectInterface();

                        switch (stereotype)
                        {
                            case "XisForm":
                                Project.PublishResult(LookupMap(rule89), EA.EnumMVErrorType.mvError, GetRuleStr(rule89));
                                isValid = false;
                                break;
                            case "XisList":
                                Project.PublishResult(LookupMap(rule90), EA.EnumMVErrorType.mvError, GetRuleStr(rule90));
                                isValid = false;
                                break;
                            case "XisListGroup":
                                Project.PublishResult(LookupMap(rule91), EA.EnumMVErrorType.mvError, GetRuleStr(rule91));
                                isValid = false;
                                break;
                            case "XisVisibilityBoundary":
                                Project.PublishResult(LookupMap(rule92), EA.EnumMVErrorType.mvError, GetRuleStr(rule92));
                                isValid = false;
                                break;
                            case "XisMenu":
                                Project.PublishResult(LookupMap(rule93), EA.EnumMVErrorType.mvError, GetRuleStr(rule93));
                                isValid = false;
                                break;
                            default:
                                break;
                        }
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:101,代码来源:Rules.cs

示例8: DoRule53_56_59

        private void DoRule53_56_59(EA.Repository Repository, EA.Element Element, String stereotype)
        {
            if (Element.Type == "Class" && Element.Stereotype == stereotype)
            {
                if (Element.Methods.Count > 0)
                {
                    EA.Method method = null;
                    int actionCounter = 0;

                    for (short i = 0; i < Element.Methods.Count; i++)
                    {
                        method = Element.Methods.GetAt(i);

                        if (method.Stereotype == "XisAction")
                        {
                            actionCounter++;
                        }
                    }

                    if (actionCounter > 1)
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        switch (stereotype)
                        {
                            case "XisButton":
                                Project.PublishResult(LookupMap(rule53), EA.EnumMVErrorType.mvError, GetRuleStr(rule53));
                                isValid = false;
                                break;
                            case "XisLink":
                                Project.PublishResult(LookupMap(rule56), EA.EnumMVErrorType.mvError, GetRuleStr(rule56));
                                isValid = false;
                                break;
                            case "XisMenuItem":
                                Project.PublishResult(LookupMap(rule59), EA.EnumMVErrorType.mvError, GetRuleStr(rule59));
                                isValid = false;
                                break;
                            default:
                                break;
                        }
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:43,代码来源:Rules.cs

示例9: DoRule62

        private void DoRule62(EA.Repository Repository, EA.Element Element)
        {
            if (Element.Type == "Class" && Element.Stereotype == "XisListItem")
            {
                String onLongTap = M2MTransformer.GetTaggedValue(Element.TaggedValues, "onLongTap").Value;

                if (!string.IsNullOrEmpty(onLongTap))
                {
                    if (Element.Methods.Count > 0)
                    {
                        EA.Method method = null;
                        bool exists = false;

                        for (short i = 0; i < Element.Methods.Count; i++)
                        {
                            method = Element.Methods.GetAt(i);

                            if (method.Stereotype == "XisAction" && method.Name == onLongTap)
                            {
                                exists = true;
                                break;
                            }
                        }

                        if (!exists)
                        {
                            EA.Project Project = Repository.GetProjectInterface();
                            Project.PublishResult(LookupMap(rule62), EA.EnumMVErrorType.mvError, GetRuleStr(rule62));
                            isValid = false;
                        }
                    }
                    else
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        Project.PublishResult(LookupMap(rule62), EA.EnumMVErrorType.mvError, GetRuleStr(rule62));
                        isValid = false;
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:40,代码来源:Rules.cs

示例10: DoRule51_54_57

        private void DoRule51_54_57(EA.Repository Repository, EA.Element Element, String stereotype)
        {
            if (Element.Type == "Class" && Element.Stereotype == stereotype)
            {
                String onTap = M2MTransformer.GetTaggedValue(Element.TaggedValues, "onTap").Value;

                if (Element.Methods.Count > 0)
                {
                    EA.Method method = null;
                    bool noOnTap = false;

                    for (short i = 0; i < Element.Methods.Count; i++)
                    {
                        method = Element.Methods.GetAt(i);

                        if (method.Stereotype == "XisAction" && method.Name != onTap)
                        {
                            noOnTap = true;
                            break;
                        }
                    }

                    if (noOnTap)
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        switch (stereotype)
                        {
                            case "XisButton":
                                Project.PublishResult(LookupMap(rule51), EA.EnumMVErrorType.mvError, GetRuleStr(rule51));
                                isValid = false;
                                break;
                            case "XisLink":
                                Project.PublishResult(LookupMap(rule54), EA.EnumMVErrorType.mvError, GetRuleStr(rule54));
                                isValid = false;
                                break;
                            case "XisMenuItem":
                                Project.PublishResult(LookupMap(rule57), EA.EnumMVErrorType.mvError, GetRuleStr(rule57));
                                isValid = false;
                                break;
                            default:
                                break;
                        }
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:46,代码来源:Rules.cs

示例11: DoRule52_55_58

        private void DoRule52_55_58(EA.Repository Repository, EA.Element Element, String stereotype)
        {
            if (Element.Type == "Class" && Element.Stereotype == stereotype)
            {
                String onTap = M2MTransformer.GetTaggedValue(Element.TaggedValues, "onTap").Value;

                if (!string.IsNullOrEmpty(onTap))
                {
                    if (Element.Methods.Count > 0)
                    {
                        EA.Method method = null;
                        bool exists = false;

                        for (short i = 0; i < Element.Methods.Count; i++)
                        {
                            method = Element.Methods.GetAt(i);

                            if (method.Stereotype == "XisAction" && method.Name == onTap)
                            {
                                exists = true;
                                break;
                            }
                        }

                        if (!exists)
                        {
                            EA.Project Project = Repository.GetProjectInterface();
                            switch (stereotype)
                            {
                                case "XisButton":
                                    Project.PublishResult(LookupMap(rule52), EA.EnumMVErrorType.mvError, GetRuleStr(rule52));
                                    isValid = false;
                                    break;
                                case "XisLink":
                                    Project.PublishResult(LookupMap(rule55), EA.EnumMVErrorType.mvError, GetRuleStr(rule55));
                                    isValid = false;
                                    break;
                                case "XisMenuItem":
                                    Project.PublishResult(LookupMap(rule58), EA.EnumMVErrorType.mvError, GetRuleStr(rule58));
                                    isValid = false;
                                    break;
                                default:
                                    break;
                            }
                        }
                    }
                    else
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        switch (stereotype)
                        {
                            case "XisButton":
                                Project.PublishResult(LookupMap(rule52), EA.EnumMVErrorType.mvError, GetRuleStr(rule52));
                                isValid = false;
                                break;
                            case "XisLink":
                                Project.PublishResult(LookupMap(rule55), EA.EnumMVErrorType.mvError, GetRuleStr(rule55));
                                isValid = false;
                                break;
                            case "XisMenuItem":
                                Project.PublishResult(LookupMap(rule58), EA.EnumMVErrorType.mvError, GetRuleStr(rule58));
                                isValid = false;
                                break;
                            default:
                                break;
                        }
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:70,代码来源:Rules.cs

示例12: DoRule50

        private void DoRule50(EA.Repository Repository, EA.Element Element)
        {
            if (Element.Type == "Class" && Element.Stereotype == "XisMenu")
            {
                EA.TaggedValue menuType = M2MTransformer.GetTaggedValue(Element.TaggedValues, "type");

                if (menuType != null && menuType.Value == "OptionsMenu")
                {
                    if (Element.ParentID > 0)
                    {
                        EA.Element parent = Repository.GetElementByID(Element.ParentID);

                        if (parent.Stereotype != "XisInteractionSpace")
                        {
                            if (parent.Stereotype == "XisVisibilityBoundary" && parent.ParentID > 0)
                            {
                                parent = Repository.GetElementByID(parent.ParentID);

                                if (parent.Stereotype != "XisInteractionSpace")
                                {
                                    EA.Project Project = Repository.GetProjectInterface();
                                    Project.PublishResult(LookupMap(rule50), EA.EnumMVErrorType.mvError, GetRuleStr(rule50));
                                    isValid = false;
                                }
                            }
                            else
                            {
                                EA.Project Project = Repository.GetProjectInterface();
                                Project.PublishResult(LookupMap(rule50), EA.EnumMVErrorType.mvError, GetRuleStr(rule50));
                                isValid = false;
                            }
                        }
                    }
                    else if (Element.Connectors.Count > 0)
                    {
                        EA.Connector conn = null;
                        EA.Element end = null;

                        for (short i = 0; i < Element.Connectors.Count; i++)
                        {
                            conn = Element.Connectors.GetAt(i);

                            if (conn.ClientID != Element.ElementID)
                            {
                                end = Repository.GetElementByID(conn.ClientID);
                            }
                            else
                            {
                                end = Repository.GetElementByID(conn.SupplierID);
                            }

                            if ((conn.Stereotype == "XisIS-MenuAssociation" && end.Stereotype != "XisInteractionSpace")
                                || (conn.Stereotype != "XisIS-MenuAssociation" && end.Stereotype == "XisInteractionSpace"))
                            {
                                EA.Project Project = Repository.GetProjectInterface();
                                Project.PublishResult(LookupMap(rule50), EA.EnumMVErrorType.mvError, GetRuleStr(rule50));
                                isValid = false;
                                break;
                            }
                        }
                    }
                    else
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        Project.PublishResult(LookupMap(rule50), EA.EnumMVErrorType.mvError, GetRuleStr(rule50));
                        isValid = false;
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:70,代码来源:Rules.cs

示例13: DoRule49

 private void DoRule49(EA.Repository Repository, EA.Element Element)
 {
     if (Element.Type == "Class" && Element.Stereotype == "XisMenuItem")
     {
         if (Element.Elements.Count > 0)
         {
             EA.Project Project = Repository.GetProjectInterface();
             Project.PublishResult(LookupMap(rule49), EA.EnumMVErrorType.mvError, GetRuleStr(rule49));
             isValid = false;
         }
     }
 }
开发者ID:theedward,项目名称:xis-mobile,代码行数:12,代码来源:Rules.cs

示例14: DoRule47

        private void DoRule47(EA.Repository Repository, EA.Element Element)
        {
            if (Element.Type == "Class" && Element.Stereotype == "XisMenuGroup")
            {
                if (Element.Elements.Count > 0)
                {
                    bool hasItem = false;
                    EA.Element el = null;

                    for (short i = 0; i < Element.Elements.Count; i++)
                    {
                        el = Element.Elements.GetAt(i);

                        if (el.Stereotype == "XisMenuItem")
                        {
                            hasItem = true;
                            break;
                        }
                    }

                    if (!hasItem)
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        Project.PublishResult(LookupMap(rule47), EA.EnumMVErrorType.mvError, GetRuleStr(rule47));
                        isValid = false;
                    }
                }
                else
                {
                    EA.Project Project = Repository.GetProjectInterface();
                    Project.PublishResult(LookupMap(rule47), EA.EnumMVErrorType.mvError, GetRuleStr(rule47));
                    isValid = false;
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:35,代码来源:Rules.cs

示例15: DoRule84

        private void DoRule84(EA.Repository Repository, EA.Method method)
        {
            if (method.Stereotype == "XisAction")
            {
                string type = M2MTransformer.GetMethodTag(method.TaggedValues, "type").Value;

                if (type == "OpenBrowser")
                {
                    if (method.Parameters.Count == 1)
                    {
                        EA.Parameter p = method.Parameters.GetAt(0);

                        if (p.Name != "url" || string.IsNullOrEmpty(p.Default))
                        {
                            EA.Project Project = Repository.GetProjectInterface();
                            Project.PublishResult(LookupMap(rule84), EA.EnumMVErrorType.mvError, GetRuleStr(rule84));
                            isValid = false;
                        }
                    }
                    else
                    {
                        EA.Project Project = Repository.GetProjectInterface();
                        Project.PublishResult(LookupMap(rule84), EA.EnumMVErrorType.mvError, GetRuleStr(rule84));
                        isValid = false;
                    }
                }
            }
        }
开发者ID:theedward,项目名称:xis-mobile,代码行数:28,代码来源:Rules.cs


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