本文整理汇总了C#中Collections类的典型用法代码示例。如果您正苦于以下问题:C# Collections类的具体用法?C# Collections怎么用?C# Collections使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Collections类属于命名空间,在下文中一共展示了Collections类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Users_ItemsRemoved
void Users_ItemsRemoved(object sender, Collections.CollectionItemsChangedEventArgs<Collections.IndexedItem<User>> e) {
foreach (var u in e.Items) {
if (u.Value.Id != Guid.Empty) {
Content.DeleteUserAsync(u.Value, PluginInfrastructure.ErrorHandling.ShowErrorDialog);
}
}
}
示例2: LoadObjectDefinitions
/// <summary>
/// Loads the object definitions.
/// </summary>
/// <param name="configurationModel">The configuration model.</param>
public void LoadObjectDefinitions(Collections.Generic.ISet<ConfigurationClass> configurationModel)
{
foreach (ConfigurationClass configClass in configurationModel)
{
LoadObjectDefinitionsForConfigurationClass(configClass);
}
}
示例3: RandomGenR
private RandomGenR()
{
this.dateModule = new Dates();
this.numberModule = new Numbers();
this.collectionsModule = new Collections();
this.stringsModule = new Strings();
}
示例4: SocketToken
public SocketToken(int id,
Sinan.Collections.BytesSegment receiveBuffer,
Sinan.Collections.BytesSegment sendBuffer,
IBufferProcessor processor,
Collections.CircularQueue<Collections.BytesSegment> sendPool = null)
{
m_connectID = id;
m_sendPool = sendPool ?? new Collections.CircularQueue<Collections.BytesSegment>(64);
m_processor = processor;
SocketAsyncEventArgs receiver = new SocketAsyncEventArgs();
receiver.Completed += new EventHandler<SocketAsyncEventArgs>(ReceiveCompleted);
receiver.SetBuffer(receiveBuffer.Array, receiveBuffer.Offset, receiveBuffer.Count);
SocketAsyncEventArgs sender = new SocketAsyncEventArgs();
sender.Completed += new EventHandler<SocketAsyncEventArgs>(SendCompleted);
sender.SetBuffer(sendBuffer.Array, sendBuffer.Offset, sendBuffer.Count);
m_receiver = receiver;
m_receiveOffset = receiver.Offset;
m_receiveMax = receiver.Count;
m_sender = sender;
m_sendOffset = sender.Offset;
m_sendMax = sender.Count;
}
示例5: QualifierAnnotationAutowireCandidateResolver
/// <summary>
/// Create a new QualifierAnnotationAutowireCandidateResolver
/// for the given qualifier attribute types.
/// </summary>
/// <param name="qualifierTypes">the qualifier annotations to look for</param>
public QualifierAnnotationAutowireCandidateResolver(Collections.Generic.ISet<Type> qualifierTypes) {
AssertUtils.ArgumentNotNull(qualifierTypes, "'qualifierTypes' must not be null");
foreach(var type in qualifierTypes)
{
if (!_qualifierTypes.Contains(type))
_qualifierTypes.Add(type);
}
}
示例6: Initialise
public override void Initialise(Collections.INamedDataProvider initialisationData)
{
base.Initialise(initialisationData);
initialisationData.TryCopyValue(this, TextureName, _texture);
initialisationData.TryCopyValue(this, BrightnessName, _brightness);
initialisationData.TryCopyValue(this, GammaCorrectName, _gammaCorrect);
}
示例7: Initialise
public override void Initialise(Collections.INamedDataProvider initialisationData)
{
base.Initialise(initialisationData);
initialisationData.TryCopyValue(this, SkyColourName, _skyColour);
initialisationData.TryCopyValue(this, GroundColourName, _groundColour);
initialisationData.TryCopyValue(this, UpName, _up);
}
示例8: Content_CheckedItemsChanged
private void Content_CheckedItemsChanged(object sender, Collections.CollectionItemsChangedEventArgs<IFilter> e) {
if (Content != null) {
foreach (IFilter filter in e.Items) {
filter.Active = checkedFilterView.Content.ItemChecked(filter);
}
UpdateFilterInfo();
}
}
示例9: Parser
public Parser(Collections.IList<object> tokens)
{
this.tokens = tokens;
this.index = 0;
this.result = this.ParseStmt();
if (this.index != this.tokens.Count)
throw new System.Exception("expected EOF");
}
示例10: Initialise
public override void Initialise(Collections.INamedDataProvider initialisationData)
{
base.Initialise(initialisationData);
initialisationData.TryCopyValue(this, ColourName, _colour);
initialisationData.TryCopyValue(this, DirectionName, _direction);
initialisationData.TryCopyValue(this, ShadowResolutionName, _shadowResolution);
initialisationData.TryCopyValue(this, ActiveName, _active);
}
示例11: Parser
public Parser(Collections.IList<object> tokens)
{
this.tokens = tokens;
this.indice = 0;
this.resultado = this.ParseStmt();
if (this.indice != this.tokens.Count)
throw new System.Exception("se esperaba el final del archivo");
}
示例12: Initialise
public override void Initialise(Collections.INamedDataProvider initialisationData)
{
base.Initialise(initialisationData);
initialisationData.TryCopyValue(this, ColourName, _colour);
initialisationData.TryCopyValue(this, PositionName, _position);
initialisationData.TryCopyValue(this, RangeName, _range);
initialisationData.TryCopyValue(this, ActiveName, _active);
}
示例13: MethodParamPair
public MethodParamPair(
MethodParamResult method,
Interfaces.IEventInput input,
Collections.ExitPathGroup _paths)
{
_result = MethodResult.None;
_method = method;
_params = input;
_exitPaths = _paths;
}
示例14: OnItemsChanged
protected override void OnItemsChanged(Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
if (e.Action == Collections.Specialized.NotifyCollectionChangedAction.Remove)
{
// Don't select itself when its child items got removed. (Default action of base.OnItemsChanged)
// The selection should be managed by designer surface.
return;
}
base.OnItemsChanged(e);
}
示例15: CreateNode
internal static Node<TreeNode> CreateNode(this HierarchyNode<ContentItem> structure, IContentAdapterProvider adapters, Collections.ItemFilter filter)
{
var adapter = adapters.ResolveAdapter<NodeAdapter>(structure.Current);
var children = structure.Children.Select(c => CreateNode(c, adapters, filter)).ToList();
return new Node<TreeNode>
{
Current = adapter.GetTreeNode(structure.Current),
HasChildren = adapter.HasChildren(structure.Current, filter),
Expanded = children.Any(),
Children = children
};
}