コード例 #1
0
ファイル: Tests.cs プロジェクト: jkulcsar/repository-pattern
        public void GetSanitizedContainerName()
        {
            // Ensure no conflicts
            var firstName  = AzureUtility.GetSanitizedContainerName <TestObject <int> >();
            var secondName = AzureUtility.GetSanitizedContainerName <TestObject <double> >();

            Assert.AreNotEqual(firstName, secondName);
        }
コード例 #2
0
        //===============================================================
        internal AzureRepository(Func <T, object[]> keySelector, CloudStorageAccount storageAccount, AzureOptions <T> options = null)
            : base(keySelector)
        {
            Options = options ?? new AzureOptions <T>();
            Options.ContainerName = Options.ContainerName != null?AzureUtility.SanitizeContainerName(Options.ContainerName) : AzureUtility.GetSanitizedContainerName <T>();

            AzureContainerInterface = new AzureContainerInterface <T>(storageAccount, Options);
            PendingChanges          = new List <IOperation>();
        }