• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DataDictionary类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中DataDictionary的典型用法代码示例。如果您正苦于以下问题:C# DataDictionary类的具体用法?C# DataDictionary怎么用?C# DataDictionary使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



DataDictionary类属于命名空间,在下文中一共展示了DataDictionary类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Get_NoItemAdded_ReturnsNull

        public void Get_NoItemAdded_ReturnsNull()
        {
            var dd = new DataDictionary ();

            string res = dd.Get ("foobar");
            Assert.IsNull (res);
        }
开发者ID:alexboly,项目名称:CSharpTestExamples,代码行数:7,代码来源:DataDictionaryTest.cs


示例2: Project

 public Project() {
     Configuration = new ClientConfiguration();
     NotificationSettings = new Dictionary<string, NotificationSettings>();
     PromotedTabs = new HashSet<string>();
     DeleteBotDataEnabled = true;
     Data = new DataDictionary();
 }
开发者ID:aamarber,项目名称:Exceptionless,代码行数:7,代码来源:Project.cs


示例3: Configure

        /// <summary>
        /// Configures the filtering dialog
        /// </summary>
        /// <param name="efsSystem"></param>
        /// <param name="filterConfiguration"></param>
        public void Configure(DataDictionary.EFSSystem efsSystem, FilterConfiguration filterConfiguration)
        {
            ruleActivationCheckBox.Checked = filterConfiguration.RuleFired;
            expectationsCheckBox.Checked = filterConfiguration.Expect;
            variableUpdateCheckBox.Checked = filterConfiguration.VariableUpdate;

            List<DataDictionary.Dictionary> dictionaries = new List<DataDictionary.Dictionary>(efsSystem.Dictionaries);
            dictionaries.Sort(compare);
            foreach (DataDictionary.Dictionary dictionary in dictionaries)
            {
                NamableTreeNode dictionaryTreeNode = new NamableTreeNode(dictionary);
                nameSpaceTreeView.Nodes.Add(dictionaryTreeNode);

                List<DataDictionary.Types.NameSpace> nameSpaces = new List<DataDictionary.Types.NameSpace>();
                foreach (DataDictionary.Types.NameSpace nameSpace in dictionary.NameSpaces)
                {
                    nameSpaces.Add(nameSpace);
                }
                nameSpaces.Sort();

                foreach (DataDictionary.Types.NameSpace nameSpace in nameSpaces)
                {
                    GatherNamespaces(dictionaryTreeNode, nameSpace, filterConfiguration);
                }
            }

            regExpTextBox.Text = filterConfiguration.RegExp;
        }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:33,代码来源:Filtering.cs


示例4: CoveredRequirements

        /// <summary>
        /// Provides the set of covered requirements by the tests
        /// </summary>
        /// <param name="aDictionary">The model</param>
        /// <returns></returns>
        public static HashSet<DataDictionary.Specification.Paragraph> CoveredRequirements(DataDictionary.Dictionary aDictionary)
        {
            HashSet<DataDictionary.Specification.Paragraph> retVal = new HashSet<DataDictionary.Specification.Paragraph>();
            ICollection<DataDictionary.Specification.Paragraph> applicableParagraphs = aDictionary.Specifications.ApplicableParagraphs;
            Dictionary<DataDictionary.Specification.Paragraph, List<DataDictionary.ReqRef>> paragraphsReqRefDictionary = aDictionary.ParagraphsReqRefs;

            foreach (DataDictionary.Specification.Paragraph paragraph in applicableParagraphs)
            {
                bool implemented = paragraph.getImplementationStatus() == DataDictionary.Generated.acceptor.SPEC_IMPLEMENTED_ENUM.Impl_Implemented;
                bool tested = false;
                if (implemented)
                {
                    if (paragraphsReqRefDictionary.ContainsKey(paragraph))
                    {
                        List<DataDictionary.ReqRef> implementations = paragraphsReqRefDictionary[paragraph];
                        for (int i = 0; i < implementations.Count; i++)
                        {
                            DataDictionary.ReqRelated reqRelated = implementations[i].Enclosing as DataDictionary.ReqRelated;
                            if (reqRelated is TestCase && reqRelated.ImplementationCompleted == true)
                            {
                                tested = true;
                            }
                        }
                    }
                }

                if (implemented && tested)
                {
                    retVal.Add(paragraph);
                }
            }

            return retVal;
        }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:39,代码来源:TestsCoverageReport.cs


示例5: Action

        /// <summary>
        /// Takes the control state of the provided context and from it produces
        /// a view state model that is used as the basis of the view-step render
        /// pipeline.
        /// </summary>
        /// <remarks>
        /// This is what you'd override if you wanted to govern your own model presented
        /// to your view layer.
        /// </remarks>
        /// <param name="ev">The event that gave rise to this action.</param>
        public override void Action(IEvent ev)
        {
            DataDictionary<IData> model = new DataDictionary<IData> {
                ["messages"] = ev.Context.Messages,
                ["errors"] = ev.Context.Errors,
                ["flags"] = ev.Context.Flags,
                ["timers"] = ev.Context.Timers,
                ["params"] = new DataDictionary<string>(ev.Context.Params.Where(param => !param.Key.StartsWith("_")))
            };

            // copy from the context

            // copy from the control state
            foreach (KeyValuePair<string, object> entry in ev.Context.State) {
                if (!entry.Key.StartsWith("_")) { // exclude "private" items
                    if (entry.Value is IData) {
                        model[entry.Key] = entry.Value as IData;
                    } else {
                        model[entry.Key] = new TextData(entry.Value.ToString());
                    }
                }
            }

            if (ev.Context.HasParams("model-item") && model.ContainsKey(ev.Context.Params["model-item"])) {
                ev.Context.ViewSteps.CreateStep("view-state", model[ev.Context.Params["model-item"]]);
            } else {
                ev.Context.ViewSteps.CreateStep("view-state", model);
            }
        }
开发者ID:guy-murphy,项目名称:inversion-vnext-dev,代码行数:39,代码来源:ViewStateBehaviour.cs


示例6: TestReport

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="efsSystem">The system for which this frame is built</param>
 public TestReport(DataDictionary.EFSSystem efsSystem)
 {
     InitializeComponent();
     reportHandler = new TestsCoverageReportHandler((Dictionary)null);
     TxtB_Path.Text = reportHandler.FileName;
     EFSSystem = efsSystem;
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:11,代码来源:Frm_TestReport.cs


示例7: ToFilterExpression

        public static string ToFilterExpression(this DataFilter dataFilter,DataDictionary dataDictionary, string objectName)
        {
            StringBuilder filterUrl = new StringBuilder();
            DataObject dataObject = null;

            try
            {
                dataObject = dataDictionary.dataObjects.Find(x => x.objectName.ToUpper() == objectName.ToUpper());
                if (dataObject == null)
                {
                    throw new Exception("Data object not found.");
                }

                if (dataFilter != null && dataFilter.Expressions != null && dataFilter.Expressions.Count > 0)
                {
                    foreach (Expression expression in dataFilter.Expressions)
                    {
                        if (filterUrl.Length <= 0) // To avoid adding logical operator at starting.
                        {
                            expression.LogicalOperator = org.iringtools.library.LogicalOperator.None;
                        }

                        string sqlExpression = ResolveFilterExpression(dataObject, expression);
                        filterUrl.Append(sqlExpression);
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Error generating filter url .", ex);
            }

            return filterUrl.ToString();
        }
开发者ID:iringtools,项目名称:rest_dl,代码行数:34,代码来源:RestDataLayer.cs


示例8: Organization

 public Organization() {
     Invites = new Collection<Invite>();
     BillingStatus = BillingStatus.Trialing;
     Usage = new Collection<UsageInfo>();
     OverageHours = new Collection<UsageInfo>();
     Data = new DataDictionary();
 }
开发者ID:Nangal,项目名称:Exceptionless,代码行数:7,代码来源:Organization.cs


示例9: setExplanation

 /// <summary>
 /// Sets the explanation for this explain box
 /// </summary>
 /// <param name="explanation"></param>
 public void setExplanation(DataDictionary.Interpreter.ExplanationPart explanation)
 {
     explainTreeView.Nodes.Clear();
     ExplainTreeNode node = new ExplainTreeNode(explanation);
     innerSetExplanation(explanation, node, 0);
     explainTreeView.Nodes.Add(node);
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:11,代码来源:ExplainBox.cs


示例10: CreateCollectionsSection

 /// <summary>
 /// Creates a section for all the (implemented) collections of the given namespace
 /// </summary>
 /// <param name="aNameSpace">The namespace</param>
 /// <param name="addDetails">Add details or simply enumerate the collections</param>
 /// <returns></returns>
 public void CreateCollectionsSection(DataDictionary.Types.NameSpace aNameSpace, bool addDetails)
 {
     if (countDisplayedReqRelated(aNameSpace.Collections) > 0)
     {
         AddSubParagraph("Collections");
         foreach (DataDictionary.Types.Collection collection in aNameSpace.Collections)
         {
             if (collection.ImplementationPartiallyCompleted == true)
             {
                 if (addDetails)
                 {
                     AddSubParagraph(collection.Name);
                     AddTable(new string[] { "Collection " + collection.Name }, new int[] { 40, 100 });
                     if (collection.Comment != "")
                     {
                         AddRow(collection.Comment);
                     }
                     AddRow("Type", collection.getTypeName());
                     AddRow("Default value", collection.Default);
                     AddRow("Max size", collection.getMaxSize().ToString());
                     CreateStatusTable(collection);
                     CloseSubParagraph();
                 }
                 else
                 {
                     AddParagraph(collection.Name + " (" + GetRequirementsAsString(collection.Requirements) + ")");
                 }
             }
         }
         CloseSubParagraph();
     }
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:38,代码来源:ModelReport.cs


示例11: PreConditionsTreeNode

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="item"></param>
 /// <param name="children"></param>
 public PreConditionsTreeNode(DataDictionary.Functions.Case item)
     : base(item, "Pre condition", true)
 {
     foreach (DataDictionary.Rules.PreCondition preCondition in item.PreConditions)
     {
         Nodes.Add(new DataDictionaryView.PreConditionTreeNode(preCondition));
     }
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:13,代码来源:PreConditionsTreeNode.cs


示例12: AddManualStackSignatureData

        public async Task AddManualStackSignatureData(string dataKey, string dataValue, bool willAddManualStackSignature) {
            var plugin = new ManualStackingPlugin();
            var data = new DataDictionary() { { dataKey, dataValue } };
            var context = new EventContext(new PersistentEvent { Data = data });

            await plugin.EventBatchProcessingAsync(new List<EventContext> { context });
            Assert.Equal(willAddManualStackSignature, context.StackSignatureData.Count > 0);
        }
开发者ID:adamzolotarev,项目名称:Exceptionless,代码行数:8,代码来源:ManualStackingTests.cs


示例13: Window

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="specification"></param>
 public Window(DataDictionary.Dictionary dictionary)
 {
     InitializeComponent();
     FormClosed += new FormClosedEventHandler(Window_FormClosed);
     Visible = false;
     Dictionary = dictionary;
     Refresh();
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:12,代码来源:Window.cs


示例14: AddParameter

        /// <summary>
        /// Adds a new parameter
        /// </summary>
        /// <param name="function"></param>
        public ParameterTreeNode AddParameter(DataDictionary.Parameter parameter)
        {
            Item.appendParameters(parameter);
            ParameterTreeNode retVal = new ParameterTreeNode(parameter);
            Nodes.Add(retVal);

            return retVal;
        }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:12,代码来源:ParametersTreeNode.cs


示例15: ParametersTreeNode

 /// <summary>
 /// Constructor (for function)
 /// </summary>
 /// <param name="item"></param>
 public ParametersTreeNode(DataDictionary.Functions.Function item)
     : base(item, "Parameters", true, false)
 {
     foreach (DataDictionary.Parameter parameter in item.FormalParameters)
     {
         Nodes.Add(new ParameterTreeNode(parameter));
     }
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:12,代码来源:ParametersTreeNode.cs


示例16: AddCase

        /// <summary>
        /// Adds a new case
        /// </summary>
        /// <param name="function"></param>
        public CaseTreeNode AddCase(DataDictionary.Functions.Case aCase)
        {
            Item.appendCases(aCase);
            CaseTreeNode retVal = new CaseTreeNode(aCase);
            Nodes.Add(retVal);

            return retVal;
        }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:12,代码来源:CasesTreeNode.cs


示例17: RulePreConditionsTreeNode

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="item"></param>
 /// <param name="children"></param>
 public RulePreConditionsTreeNode(DataDictionary.Rules.RuleCondition item)
     : base(item, "Pre conditions", true, false)
 {
     foreach (DataDictionary.Rules.PreCondition preCondition in item.PreConditions)
     {
         Nodes.Add(new PreConditionTreeNode(preCondition));
     }
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:13,代码来源:RulePreConditionsTreeNode.cs


示例18: AddRule

        /// <summary>
        /// Adds a rule in this set of sub rules
        /// </summary>
        /// <param name="rule"></param>
        public void AddRule(DataDictionary.Rules.Rule rule)
        {
            Item.appendSubRules(rule);
            Nodes.Add(new RuleTreeNode(rule));
            SortSubNodes();

            Item.setVerified(false);
        }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:12,代码来源:SubRulesTreeNode.cs


示例19: CasesTreeNode

 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="item"></param>
 /// <param name="name"></param>
 public CasesTreeNode(DataDictionary.Functions.Function item)
     : base(item, "Cases", true, false)
 {
     foreach (DataDictionary.Functions.Case aCase in item.Cases)
     {
         Nodes.Add(new CaseTreeNode(aCase));
     }
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:13,代码来源:CasesTreeNode.cs


示例20: AddValue

 public void AddValue(DataDictionary.Constants.EnumValue value)
 {
     value.Name = "<EnumValue" + (GetNodeCount(false) + 1) + ">";
     value.setValue("");
     Item.appendValues(value);
     Nodes.Add(new EnumerationValueTreeNode(value));
     SortSubNodes();
 }
开发者ID:Assmann-Siemens,项目名称:ERTMSFormalSpecs,代码行数:8,代码来源:EnumerationValuesTreeNode.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataEntryFormMode类代码示例发布时间:2022-05-24
下一篇:
C# DataControlRowType类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap