public ConfigurationNodeCollection() { _listIndex = new ListIndex <ConfigurationNode>("List"); _nameIndex = new UniqueIndex <string, ConfigurationNode>("Name", node => GetKeyResponse.Create(true, node.Name), SortOrder.Ascending); _collection = new IndexableCollection <ConfigurationNode>(_listIndex); _collection.Indexes.Add(_nameIndex); }
internal XmlSpreadsheetAttributeCollection() { NameIndex = new UniqueIndex <string, XmlSpreadsheetAttribute>( "NameIndex", item => GetKeyResponse.Create(true, item.LocalName), SortOrder.None); _items = new IndexableCollection <XmlSpreadsheetAttribute>(NameIndex); }
/// <summary> /// /// </summary> public TextDataSetTableCollection() { _listIndex = new ListIndex <TextDataSetTable>("List"); _nameIndex = new UniqueIndex <string, TextDataSetTable>( "Name", item => GetKeyResponse.Create(true, item.Name), SortOrder.None); _collection = new IndexableCollection <TextDataSetTable>(_listIndex); _collection.Indexes.Add(_nameIndex); }
/// <summary> /// /// </summary> /// <param name="monitoredObject"></param> public PriorityMonitor(T monitoredObject) { MonitoredObject = monitoredObject; _priorityIndex = new NonUniqueIndex <int, LockRequest>( "priorityIndex", item => GetKeyResponse.Create(true, item.Priority), SortOrder.Ascending); _lockRequests = new IndexableCollection <LockRequest>(_priorityIndex); }
public void TestMethod1() { GetKeyRequest request = new GetKeyRequest(); request.SealedKeyRequest = new SealedContentType(); //TODO:take sealed content KgssPortTypeClient kgss = new KgssPortTypeClient("kgss-79021802145"); GetKeyResponse response = kgss.GetKey(request); }
public TextDataColumnCollection() { _listIndex = new ListIndex <TextDataColumn>("List"); _nameIndex = new UniqueIndex <string, TextDataColumn>( "Name", column => GetKeyResponse.Create(true, column.ColumnName), SortOrder.None); _collection = new IndexableCollection <TextDataColumn>(_listIndex); }
/// <summary> /// /// </summary> public TextDataParameterCollection() { _listIndex = new ListIndex <TextDataParameter>("List"); _nameIndex = new UniqueIndex <string, TextDataParameter>( "Name", parameter => GetKeyResponse.Create(true, parameter.ParameterName), SortOrder.None); _collection = new IndexableCollection <TextDataParameter>(_listIndex); _collection.Indexes.Add(_nameIndex); }
private static async Task GetKey(KmsManagementClient kmsManagementClient, string keyId) { logger.Info("Get Key"); GetKeyRequest getKeyRequest = new GetKeyRequest { KeyId = keyId }; GetKeyResponse getKeyResponse = await kmsManagementClient.GetKey(getKeyRequest); logger.Info($"Key Retrieved: {getKeyResponse.Key.DisplayName}"); }
/// <summary> /// /// </summary> public ConfigurationAttributeCollection() { _listIndex = new ListIndex <ConfigurationAttribute>("List"); _nameIndex = new UniqueIndex <string, ConfigurationAttribute>( "NameIndex", attribute => GetKeyResponse.Create(true, attribute.Name), SortOrder.None); _collection = new IndexableCollection <ConfigurationAttribute>(_listIndex); _collection.Indexes.Add(_nameIndex); }
public CommandLine(string commandLine) { ArgumentNullException.ThrowIfNull(commandLine); _arguments = new IndexableCollection <CommandLineArgument>(ListIndex); var dictionary = new Dictionary <string, ICollection <CommandLineArgument> >(StringComparer.InvariantCultureIgnoreCase); NameIndex = new NonUniqueIndex <string, CommandLineArgument>( "nameIndex", argument => GetKeyResponse.Create(argument.Name != null, argument.Name), dictionary, () => new List <CommandLineArgument>()); _arguments.Indexes.Add(NameIndex); var stringReader = new StringReader(commandLine); var arguments = Parse(stringReader); _arguments.Add(arguments); }
/// <summary> /// /// </summary> /// <param name="maximumConcurrencyLevel"></param> /// <param name="timerPeriod"></param> public MemoryCache(int maximumConcurrencyLevel, TimeSpan timerPeriod) { this.keyIndex = new UniqueIndex <string, CacheEntry>( "key", entry => GetKeyResponse.Create(true, entry.CacheItem.Key), SortOrder.None); this.absoluteExpirationIndex = new NonUniqueIndex <DateTime, CacheEntry>( "absoluteExpiration", entry => GetKeyResponse.Create(true, entry.AbsoluteExpiration), SortOrder.Ascending); this.entries = new IndexableCollection <CacheEntry>(this.keyIndex); this.entries.Indexes.Add(this.absoluteExpirationIndex); this.scheduler = new LimitedConcurrencyLevelTaskScheduler("MemoryCache", maximumConcurrencyLevel, new ConcurrentQueue <Action>()); this.timer = new Timer(this.TimerCallback, null, timerPeriod, timerPeriod); }
static TypeNameCollection() { NameIndex = new UniqueIndex <string, TypeCollectionItem>( "Name", item => GetKeyResponse.Create(true, item.Name), SortOrder.None); TypeIndex = new UniqueIndex <Type, TypeCollectionItem>( "Type", item => GetKeyResponse.Create(true, item.Type), new Dictionary <Type, TypeCollectionItem>(TypeEqualityComparer.Instance)); Collection = new IndexableCollection <TypeCollectionItem>(NameIndex); Collection.Indexes.Add(TypeIndex); Add(CSharpTypeName.Boolean, typeof(bool)); Add(CSharpTypeName.Char, typeof(char)); Add(CSharpTypeName.String, typeof(string)); Add(CSharpTypeName.Object, typeof(object)); Add(CSharpTypeName.SByte, typeof(sbyte)); Add(CSharpTypeName.Int16, typeof(short)); Add(CSharpTypeName.Int32, typeof(int)); Add(CSharpTypeName.Int64, typeof(long)); Add(CSharpTypeName.Byte, typeof(byte)); Add(CSharpTypeName.UInt16, typeof(ushort)); Add(CSharpTypeName.UInt32, typeof(uint)); Add(CSharpTypeName.UInt64, typeof(ulong)); Add(CSharpTypeName.Single, typeof(float)); Add(CSharpTypeName.Double, typeof(double)); Add(CSharpTypeName.Decimal, typeof(decimal)); Add(TypeName.DateTime, typeof(DateTime)); Add(TypeName.XmlNode, typeof(XmlNode)); SystemAssembly = Assembly.GetAssembly(typeof(int)); }