// Decompiled with JetBrains decompiler // Type: Microsoft.InfoCards.SecondaryIndexDefinition // Assembly: infocard, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 // MVID: 516D8B44-4448-4D2C-8B8E-FFBB3FFE472B // Assembly location: C:\Users\Administrateur\Downloads\Virusshare-00000-msil\Virus.Win32.Expiro.w-69bb73081eac86b8cf86f45e33515d0095855636967076e2b593d7a30cd80a07.exe using Microsoft.InfoCards.Diagnostics; using System; namespace Microsoft.InfoCards { internal sealed class SecondaryIndexDefinition { public const string GlobalIdIndex = "ix_globalid"; public const string ObjectTypeIndex = "ix_objecttype"; public const string NameIndex = "ix_name"; public const string RecipientIdIndex = "ix_name"; public const string ProductionServiceIndex = "ix_production_svc_uri"; public const string ParentIdIndex = "ix_parentid"; public const string MasterKeyIndex = "ix_masterkey"; public const string SupportedClaimIndex = "ix_supportclaim"; public const string SupportedAuthIndex = "ix_supportauth"; private static readonly SecondaryIndexDefinition[] s_masterIndexes = new SecondaryIndexDefinition[8] { new SecondaryIndexDefinition("ix_globalid", 10, 20, SecondaryIndexSettings.Unique, Canonicalizers.Binary), new SecondaryIndexDefinition("ix_objecttype", 10, 20, SecondaryIndexSettings.None, Canonicalizers.Binary), new SecondaryIndexDefinition("ix_name", 10, 20, SecondaryIndexSettings.Nullable, Canonicalizers.CaseInsensitiveWithHashing), new SecondaryIndexDefinition("ix_production_svc_uri", 10, 20, SecondaryIndexSettings.Nullable, Canonicalizers.CaseInsensitiveWithHashing), new SecondaryIndexDefinition("ix_parentid", 10, 20, SecondaryIndexSettings.Nullable, Canonicalizers.Binary), new SecondaryIndexDefinition("ix_masterkey", 10, 20, SecondaryIndexSettings.Nullable | SecondaryIndexSettings.Unique, Canonicalizers.BinaryWithHashing), new SecondaryIndexDefinition("ix_supportclaim", 50, 20, SecondaryIndexSettings.Nullable, Canonicalizers.CaseSensitiveWithHashing), new SecondaryIndexDefinition("ix_supportauth", 10, 20, SecondaryIndexSettings.Nullable, Canonicalizers.Binary) }; private int m_initialSize; private int m_growthFactor; private SecondaryIndexSettings m_settings; private string m_name; private ICanonicalizer m_canonicalizer; private SecondaryIndexDefinition( string name, int initialSize, int growthFactor, SecondaryIndexSettings settings, ICanonicalizer canonicalizer) { if (string.IsNullOrEmpty(name)) throw InfoCardTrace.ThrowHelperArgumentNull(nameof (name)); if (initialSize <= 0) throw InfoCardTrace.ThrowHelperError((Exception) new ArgumentOutOfRangeException(nameof (initialSize), (object) initialSize, SR.GetString("StoreIndexInitialSizeInvalid"))); if (canonicalizer == null) throw InfoCardTrace.ThrowHelperArgumentNull(nameof (canonicalizer)); if (growthFactor <= 0) throw InfoCardTrace.ThrowHelperError((Exception) new ArgumentOutOfRangeException(nameof (growthFactor), (object) growthFactor, SR.GetString("StoreIndexGrowthFactorInvalid"))); this.m_initialSize = initialSize; this.m_growthFactor = growthFactor; this.m_settings = settings; this.m_name = name; this.m_canonicalizer = canonicalizer; } public static SecondaryIndexDefinition[] MasterIndexes => SecondaryIndexDefinition.s_masterIndexes; public ICanonicalizer Canonicalizer => this.m_canonicalizer; public string Name => this.m_name; public int InitialSize => this.m_initialSize; public int GrowthFactor => this.m_growthFactor; public SecondaryIndexSettings Settings => this.m_settings; public static SecondaryIndexDefinition GetByName(string name) { for (int index = 0; index < SecondaryIndexDefinition.s_masterIndexes.Length; ++index) { if (SecondaryIndexDefinition.s_masterIndexes[index].Name == name) return SecondaryIndexDefinition.s_masterIndexes[index]; } return (SecondaryIndexDefinition) null; } } }