本文整理汇总了C#中IDictionary.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# IDictionary.Remove方法的具体用法?C# IDictionary.Remove怎么用?C# IDictionary.Remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDictionary
的用法示例。
在下文中一共展示了IDictionary.Remove方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PostFilterProperties
/// <summary>
/// Allows a designer to change or remove items from the set
/// of properties that it exposes through a <see cref="T:System.ComponentModel.TypeDescriptor"/>.
/// </summary>
/// <param name="properties">The properties for the class of the component.</param>
protected override void PostFilterProperties(IDictionary properties)
{
properties.Remove("CategoryName");
properties.Remove("CounterName");
base.PostFilterProperties(properties);
}
示例2: PostFilterEvents
/// <summary>
/// Allows a designer to change or remove items from the set
/// of events that it exposes through a <see cref="T:System.ComponentModel.TypeDescriptor"/>.
/// </summary>
/// <param name="events">The events for the class of the component.</param>
protected override void PostFilterEvents(IDictionary events)
{
events.Remove("CategoryNameChanged");
events.Remove("CounterNameChanged");
base.PostFilterEvents(events);
}
示例3: PreFilterProperties
/// <summary>
/// Adjusts the set of properties the component will expose through a <see cref="T:System.ComponentModel.TypeDescriptor" />.
/// </summary>
/// <param name="properties">An <see cref="T:System.Collections.IDictionary" /> that contains the properties for the class of the component.</param>
protected override void PreFilterProperties(IDictionary properties)
{
properties.Remove("ImeMode");
properties.Remove("Padding");
properties.Remove("FlatAppearance");
properties.Remove("FlatStyle");
properties.Remove("AutoEllipsis");
properties.Remove("UseCompatibleTextRendering");
properties.Remove("Image");
properties.Remove("ImageAlign");
properties.Remove("ImageIndex");
properties.Remove("ImageKey");
properties.Remove("ImageList");
properties.Remove("TextImageRelation");
properties.Remove("BackgroundImage");
properties.Remove("BackgroundImageLayout");
properties.Remove("UseVisualStyleBackColor");
//properties.Remove("Font");
properties.Remove("RightToLeft");
base.PreFilterProperties(properties);
}
示例4: PreFilterProperties
protected override void PreFilterProperties(IDictionary properties)
{
base.PreFilterProperties(properties);
#if NOTDEF
// We add a design-time property called TrackSelection that is used to track
// the active selection. If the user sets this to true (the default), then
// we will listen to selection change events and update the control's active
// control to point to the current primary selection.
GA ga = (GA) Component;
if ( ga.EncodingType == EncodingType.Custom )
{
properties.Remove("ChromosomeLength");
}
if ( ga.EncodingType != EncodingType.Integer )
{
properties.Remove("MaxIntValue");
properties.Remove("MinIntValue");
}
if ( ga.EncodingType != EncodingType.Real )
{
properties.Remove("MaxDoubleValue");
properties.Remove("MinDoubleValue");
}
// properties["TrackSelection"] = TypeDescriptor.CreateProperty(
// this.GetType(), // the type this property is defined on
// "TrackSelection", // the name of the property
// typeof(bool), // the type of the property
// new Attribute[] {CategoryAttribute.Design}); // attributes
#endif
}
示例5: Init
public override void Init (TemplateParser parser,
ControlBuilder parentBuilder,
Type type,
string tagName,
string id,
IDictionary attribs)
{
if (attribs == null)
throw new ParseException (parser.Location, "Error in ObjectTag.");
attribs.Remove ("runat");
this.id = attribs ["id"] as string;
attribs.Remove ("id");
if (this.id == null || this.id.Trim () == "")
throw new ParseException (parser.Location, "Object tag must have a valid ID.");
scope = attribs ["scope"] as string;
string className = attribs ["class"] as string;
attribs.Remove ("scope");
attribs.Remove ("class");
if (className == null || className.Trim () == "")
throw new ParseException (parser.Location, "Object tag must have 'class' attribute.");
this.type = parser.LoadType (className);
if (this.type == null)
throw new ParseException (parser.Location, "Type " + className + " not found.");
if (attribs ["progid"] != null || attribs ["classid"] != null)
throw new ParseException (parser.Location, "ClassID and ProgID are not supported.");
if (attribs.Count > 0)
throw new ParseException (parser.Location, "Unknown attribute");
}
示例6: PreFilterProperties
protected override void PreFilterProperties(IDictionary properties)
{
properties.Remove((object) "Dock");
properties.Remove((object) "AutoSize");
properties.Remove((object) "AutoSizeMode");
base.PreFilterProperties(properties);
}
示例7: PostFilterEvents
/// <summary>
/// Allows a designer to change or remove items from the set of events that it exposes through a <see cref="T:System.ComponentModel.TypeDescriptor"></see>.
/// </summary>
/// <param name="events">The events for the class of the component.</param>
protected override void PostFilterEvents(IDictionary events)
{
events.Remove("FontChanged");
events.Remove("ForeColorChanged");
events.Remove("TextChanged");
base.PostFilterEvents(events);
}
示例8: PreFilterProperties
/// <summary>
/// Drops the BackgroundImage property
/// </summary>
/// <param name="properties">properties to remove BackGroundImage from</param>
protected override void PreFilterProperties(IDictionary properties)
{
base.PreFilterProperties(properties);
if (properties.Contains("BackgroundImage"))
properties.Remove("BackgroundImage");
if (properties.Contains("DrawGrid"))
properties.Remove("DrawGrid");
}
示例9: PostFilterProperties
protected override void PostFilterProperties(IDictionary properties)
{
properties.Remove("BackColor");
properties.Remove("BackgroundImage");
properties.Remove("BackgroundImageLayout");
properties.Remove("BorderStyle");
base.PostFilterProperties(properties);
}
示例10: PostFilterProperties
/// <summary>
/// Allows a designer to change or remove items from the set
/// of properties that it exposes through a <see cref="T:System.ComponentModel.TypeDescriptor"/>.
/// </summary>
/// <param name="properties">The properties for the class of the component.</param>
protected override void PostFilterProperties(IDictionary properties)
{
properties.Remove("BackColor");
properties.Remove("Font");
properties.Remove("ForeColor");
properties.Remove("RightToLeft");
base.PostFilterProperties(properties);
}
示例11: PostFilterProperties
/// <summary>
/// Allows a designer to change or remove items from the set of properties that it exposes through a <see cref="T:System.ComponentModel.TypeDescriptor"></see>.
/// </summary>
/// <param name="properties">The properties for the class of the component.</param>
protected override void PostFilterProperties(IDictionary properties)
{
properties.Remove("AutoSize");
properties.Remove("AutoSizeMode");
properties.Remove("CausesValidation");
base.PostFilterProperties(properties);
}
示例12: RsaCheck
/// <summary> 验证签名 </summary>
/// <param name="parameters">所有接收到的参数</param>
/// <param name="publicKey"></param>
/// <param name="charset"></param>
/// <returns></returns>
public static bool RsaCheck(IDictionary<string, string> parameters, string publicKey, string charset)
{
var sign = parameters["sign"];
parameters.Remove("sign");
parameters.Remove("sign_type");
var signContent = parameters.ParamsUrl(true, false);
return RsaCheckContent(signContent, sign, publicKey, charset);
}
示例13: CalculateChromosomeCounts
/// <summary>
/// Update the attributes of the attributes map given the VariantContext to reflect the
/// proper chromosome-based VCF tags
/// </summary>
/// <param name="vc"> the VariantContext </param>
/// <param name="attributes"> the attributes map to populate; must not be null; may contain old values </param>
/// <param name="removeStaleValues"> should we remove stale values from the mapping? </param>
/// <param name="founderIds"> - Set of founders Ids to take into account. AF and FC will be calculated over the founders.
/// If empty or null, counts are generated for all samples as unrelated individuals </param>
/// <returns> the attributes map provided as input, returned for programming convenience </returns>
public static IDictionary<string, object> CalculateChromosomeCounts (VariantContext vc, IDictionary<string, object> attributes, bool removeStaleValues, ISet<string> founderIds)
{
int AN = vc.CalledChrCount;
// if everyone is a no-call, remove the old attributes if requested
if (AN == 0 && removeStaleValues) {
if (attributes.ContainsKey (VCFConstants.ALLELE_COUNT_KEY)) {
attributes.Remove (VCFConstants.ALLELE_COUNT_KEY);
}
if (attributes.ContainsKey (VCFConstants.ALLELE_FREQUENCY_KEY)) {
attributes.Remove (VCFConstants.ALLELE_FREQUENCY_KEY);
}
if (attributes.ContainsKey (VCFConstants.ALLELE_NUMBER_KEY)) {
attributes.Remove (VCFConstants.ALLELE_NUMBER_KEY);
}
return attributes;
}
if (vc.HasGenotypes) {
attributes [VCFConstants.ALLELE_NUMBER_KEY] = AN;
// if there are alternate alleles, record the relevant tags
if (vc.AlternateAlleles.Count > 0) {
List<double> alleleFreqs = new List<double> ();
List<int> alleleCounts = new List<int> ();
List<int> foundersAlleleCounts = new List<int> ();
double totalFoundersChromosomes = (double)vc.GetCalledChrCount (founderIds);
int foundersAltChromosomes;
foreach (Allele allele in vc.AlternateAlleles) {
foundersAltChromosomes = vc.GetCalledChrCount (allele, founderIds);
alleleCounts.Add (vc.GetCalledChrCount (allele));
foundersAlleleCounts.Add (foundersAltChromosomes);
if (AN == 0) {
alleleFreqs.Add (0.0);
} else {
double freq = (double)foundersAltChromosomes / totalFoundersChromosomes;
alleleFreqs.Add (freq);
}
}
if (alleleCounts.Count == 1) {
attributes [VCFConstants.ALLELE_COUNT_KEY] = alleleCounts [0];
} else {
attributes [VCFConstants.ALLELE_COUNT_KEY] = alleleCounts;
}
if (alleleFreqs.Count == 1) {
attributes [VCFConstants.ALLELE_FREQUENCY_KEY] = alleleFreqs [0];
} else {
attributes [VCFConstants.ALLELE_FREQUENCY_KEY] = alleleFreqs;
}
} else {
// if there's no alt AC and AF shouldn't be present
attributes.Remove (VCFConstants.ALLELE_COUNT_KEY);
attributes.Remove (VCFConstants.ALLELE_FREQUENCY_KEY);
}
}
return attributes;
}
示例14: PostFilterEvents
/// <summary>
/// Allows a designer to change or remove items from the set of events that it exposes through a <see cref="T:System.ComponentModel.TypeDescriptor"></see>.
/// </summary>
/// <param name="events">The events for the class of the component.</param>
protected override void PostFilterEvents(IDictionary events)
{
events.Remove("AutoSizeChanged");
events.Remove("CausesValidationChanged");
events.Remove("Validated");
events.Remove("Validating");
base.PostFilterEvents(events);
}
示例15: PostFilterProperties
//Overrides
/// <summary>
/// Remove Button and Control properties that are
/// not supported by the <see cref="TrackBarEx"/>.
/// </summary>
protected override void PostFilterProperties(IDictionary Properties)
{
Properties.Remove("AllowDrop");
Properties.Remove("BackgroundImage");
Properties.Remove("ContextMenu");
Properties.Remove("Text");
Properties.Remove("TextAlign");
Properties.Remove("RightToLeft");
}