本文整理汇总了C#中DataDictionary类的典型用法代码示例。如果您正苦于以下问题:C# DataDictionary类的具体用法?C# DataDictionary怎么用?C# DataDictionary使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DataDictionary类属于命名空间,在下文中一共展示了DataDictionary类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Get_NoItemAdded_ReturnsNull
public void Get_NoItemAdded_ReturnsNull()
{
var dd = new DataDictionary ();
string res = dd.Get ("foobar");
Assert.IsNull (res);
}
示例2: Project
public Project() {
Configuration = new ClientConfiguration();
NotificationSettings = new Dictionary<string, NotificationSettings>();
PromotedTabs = new HashSet<string>();
DeleteBotDataEnabled = true;
Data = new DataDictionary();
}
示例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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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();
}
示例8: Organization
public Organization() {
Invites = new Collection<Invite>();
BillingStatus = BillingStatus.Trialing;
Usage = new Collection<UsageInfo>();
OverageHours = new Collection<UsageInfo>();
Data = new DataDictionary();
}
示例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);
}
示例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();
}
}
示例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));
}
}
示例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);
}
示例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();
}
示例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;
}
示例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));
}
}