Exemplo n.º 1
0
        public void GetSanitizedContainerName()
        {
            // Ensure no conflicts
            var firstName  = AzureUtility.GetSanitizedContainerName <TestObject <int> >();
            var secondName = AzureUtility.GetSanitizedContainerName <TestObject <double> >();

            Assert.AreNotEqual(firstName, secondName);
        }
Exemplo n.º 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>();
        }
Exemplo n.º 3
0
        //===============================================================
        public static AzureRepository <T> FromNamedConnectionString(Func <T, object> keySelector, String connectionStringName, AzureOptions <T> options = null)
        {
            var connStr = AzureUtility.GetNamedConnectionString(connectionStringName);

            return(FromExplicitConnectionString(keySelector, connStr, options));
        }
Exemplo n.º 4
0
        //===============================================================
        public static ExplicitKeyAzureRepository <TValue> FromNamedConnectionString(String connectionStringName, AzureOptions <TValue> options = null)
        {
            var connStr = AzureUtility.GetNamedConnectionString(connectionStringName);

            return(FromExplicitConnectionString(connStr, options));
        }