当前位置: 首页>>代码示例>>C#>>正文


C# CloudTableClient.GetTableReference方法代码示例

本文整理汇总了C#中Microsoft.WindowsAzure.Storage.Table.CloudTableClient.GetTableReference方法的典型用法代码示例。如果您正苦于以下问题:C# CloudTableClient.GetTableReference方法的具体用法?C# CloudTableClient.GetTableReference怎么用?C# CloudTableClient.GetTableReference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.WindowsAzure.Storage.Table.CloudTableClient的用法示例。


在下文中一共展示了CloudTableClient.GetTableReference方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestCacheStats

 public TestCacheStats(TestResultStorage testResultStorage, CloudTableClient tableClient)
 {
     _testResultStorage = testResultStorage;
     _unitTestCounterUtil = new CounterUtil<UnitTestCounterEntity>(tableClient.GetTableReference(AzureConstants.TableNames.CounterUnitTestQuery));
     _testCacheCounterUtil = new CounterUtil<TestCacheCounterEntity>(tableClient.GetTableReference(AzureConstants.TableNames.CounterTestCache));
     _testRunCounterUtil = new CounterUtil<TestRunCounterEntity>(tableClient.GetTableReference(AzureConstants.TableNames.CounterTestRun));
 }
开发者ID:jaredpar,项目名称:jenkins,代码行数:7,代码来源:TestCacheStats.cs

示例2: TableStorageSiteUrlRepository

        public TableStorageSiteUrlRepository(IStorageQueueConfiguration configuration)
        {
            _storageAccount = CloudStorageAccount.Parse(configuration.GetConnectionString());

            _tableClient = _storageAccount.CreateCloudTableClient();
            _tableClient.GetTableReference(_tableName);
            _tableClient.GetTableReference(_tableName).CreateIfNotExists();

            _tableContext = _tableClient.GetTableServiceContext();
        }
开发者ID:prateek08,项目名称:SiteMonitR,代码行数:10,代码来源:TableStorageSiteUrlRepository.cs

示例3: StorageWrapper

 public StorageWrapper()
 {
     _storageAccount = CloudStorageAccount.Parse(
         RoleEnvironment.GetConfigurationSettingValue(_connectionStringName)
         );
     _tableClient = _storageAccount.CreateCloudTableClient();
     _tableClient.GetTableReference(_tableName);
     _tableClient.GetTableReference(_tableName).CreateIfNotExists();
     _tableContext = _tableClient.GetTableServiceContext();
 }
开发者ID:nagyist,项目名称:CloudMonitR,代码行数:10,代码来源:StorageWrapper.cs

示例4: TableEventStore

 public TableEventStore(CloudStorageAccount cloudStorageAccount, string domainPrefix)
 {
     this.cloudStorageAccount = cloudStorageAccount;
     this.domainPrefix = domainPrefix;
     cloudTableClient = cloudStorageAccount.CreateCloudTableClient();
     cloudTableClient.RetryPolicy = new ExponentialRetry(TimeSpan.FromMilliseconds(100), 20);
     EventStoreTable = cloudTableClient.GetTableReference(domainPrefix + "EventStore");
     EventStoreTable.CreateIfNotExists();
     logTable = cloudTableClient.GetTableReference(domainPrefix + "ConsumptionLog");
     logTable.CreateIfNotExists();
 }
开发者ID:AndyHitchman,项目名称:BlastTrack,代码行数:11,代码来源:TableEventStore.cs

示例5: SpeakerService

        public SpeakerService(string speakerId)
        {
            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["pocketDDDCloudStorage"].ConnectionString);
            this.tableClient = storageAccount.CreateCloudTableClient();
            this.userCommentsTable = tableClient.GetTableReference("Comments");
            this.userSessionDataTable = tableClient.GetTableReference("UserSessionData");
            var speakerLookupService = new SpeakerLookupService();
            this.speakerMapping = speakerLookupService.GetSpeakerMapping(speakerId);

            if (this.speakerMapping == null)
                throw new ApplicationException("Invalid speakerId");
        }
开发者ID:RossDScott,项目名称:PocketDDD,代码行数:12,代码来源:SpeakerService.cs

示例6: UserGeneratedDataService

        public UserGeneratedDataService(EventsService eventsService, UserService userService, IList<DDDEventDataInfo> dddEventDataInfo)
        {
            this.userService = userService;
            this.eventsService = eventsService;
            this.dddEventDataInfo = dddEventDataInfo;

            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["pocketDDDCloudStorage"].ConnectionString);
            this.tableClient = storageAccount.CreateCloudTableClient();
            this.userCommentsTable = tableClient.GetTableReference("Comments");
            this.userSessionDataTable = tableClient.GetTableReference("UserSessionData");
            this.userEventDataTable = tableClient.GetTableReference("UserEventData");
        }
开发者ID:RossDScott,项目名称:PocketDDD,代码行数:12,代码来源:UserGeneratedDataService.cs

示例7: Configure

        public void Configure()
        {
            // Create the table client.
            _tableClient = _storageAccount.CreateCloudTableClient();
            _urltable = _tableClient.GetTableReference("url");
            _indextable = _tableClient.GetTableReference("index");

            // Create the table if it doesn't exist
            _urltable.CreateIfNotExistsAsync().Wait();
            _indextable.CreateIfNotExistsAsync().Wait();

            // Create index if it doesn't exist
            createIndexIfNotExist().Wait();
        }
开发者ID:shirhatti,项目名称:testproj,代码行数:14,代码来源:AzureTableContext.cs

示例8: CleanupTable

 private void CleanupTable(string tableName)
 {
     var account = CloudStorageAccount.DevelopmentStorageAccount;
     var cloudTableClient = new CloudTableClient(account.TableEndpoint, account.Credentials);
     var table = cloudTableClient.GetTableReference(tableName);
     table.DeleteIfExists();
 }
开发者ID:drinkbird,项目名称:DrinkBird.Tools.AzureStorage,代码行数:7,代码来源:TableTests.cs

示例9: TProduct

        public TProduct(string affiliate, string code, int qty, bool force_lookup = false)
        {
            ProductCode = code;
            Qty = qty;

            cloud = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("AbundaStorage"));

            client = cloud.CreateCloudTableClient();

            products = client.GetTableReference("Products");
            products.CreateIfNotExists();

            using (var context = new DataBaseDataContext())
            {
                var aff = (from ev in context.Affiliates
                           where ev.code == affiliate
                           select ev).FirstOrDefault();

                merchantID = aff.MerchantID;
                marketplaceID = aff.MarketPlaceID;
                secretKey = aff.SecretKey;
                accessKey = aff.AccessKey;
            }

            var amzResults = PerformAmazonLookup();
        }
开发者ID:WickedMonkeySoftware,项目名称:AbundaAzure,代码行数:26,代码来源:TProduct.cs

示例10: StorageTableAccessor

 public StorageTableAccessor(CloudStorageAccount storageAccount)
 {
     CloudTableClient tableClient = new CloudTableClient(storageAccount.TableStorageUri, storageAccount.Credentials);
     this.table = tableClient.GetTableReference(messageTableName);
     this.table.CreateIfNotExists();
     ReadFirstEntry();
 }
开发者ID:theadriangreen,项目名称:azure-sdk-for-net,代码行数:7,代码来源:StorageTableAccessor.cs

示例11: TableHelper

        public TableHelper(CloudTableClient client)
        {
            urlTable = client.GetTableReference("urltable");
            dataTable = client.GetTableReference("datatable");
            errorTable = client.GetTableReference("errortable");

            urlTable.CreateIfNotExists();
            dataTable.CreateIfNotExists();
            errorTable.CreateIfNotExists();

            lastTenErrors = new Queue<string>();
            lastTenUrls = new Queue<string>();
            crawledSize = int.Parse(get(dataTable, "data", "count", "0"));
            queueSize = int.Parse(get(dataTable, "data", "queuesize", "0"));
            errorSize = int.Parse(get(dataTable, "data", "errorsize", "0"));
        }
开发者ID:nickclawUW,项目名称:CnnCrawler,代码行数:16,代码来源:TableHelper.cs

示例12: NDIAzureTableController

 static NDIAzureTableController()
 {
     _storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
     _tableClient = _storageAccount.CreateCloudTableClient();
     _table = _tableClient.GetTableReference("ndiparams");
     _retrieveOperation = TableOperation.Retrieve("VidParams", "LastVideo");
 }
开发者ID:JuanKRuiz,项目名称:Noches-de-Innovacion-Website,代码行数:7,代码来源:NDIAzureTableController.cs

示例13: SensorAccess

 public SensorAccess()
 {
     credentials = new StorageCredentials(_accountName, _key);
     storageAccount = new CloudStorageAccount(credentials, true);
     tableClient = storageAccount.CreateCloudTableClient();
     table = tableClient.GetTableReference("AccelerometerTable");
 }
开发者ID:shijiong,项目名称:FallDetection,代码行数:7,代码来源:StorageSensor.cs

示例14: CreateCustomerMetadata

        static void CreateCustomerMetadata(CloudTableClient tableClient)
        {
            Console.WriteLine("Creating customers metadata...");

            CloudTable customersMetadataTable = tableClient.GetTableReference("customersmetadata");
            customersMetadataTable.CreateIfNotExists();

            var msftAddress1 = new DictionaryTableEntity();
            msftAddress1.PartitionKey = "MSFT";
            msftAddress1.RowKey = "ADDRESS-" + Guid.NewGuid().ToString("N").ToUpper();
            msftAddress1.Add("city", "Seattle");
            msftAddress1.Add("street", "111 South Jackson");

            var msftWebsite1 = new DictionaryTableEntity();
            msftWebsite1.PartitionKey = "MSFT";
            msftWebsite1.RowKey = "WEBSITE-" + Guid.NewGuid().ToString("N").ToUpper();
            msftWebsite1.Add("url", "http://www.microsoft.com");

            var msftWebsite2 = new DictionaryTableEntity();
            msftWebsite2.PartitionKey = "MSFT";
            msftWebsite2.RowKey = "WEBSITE-" + Guid.NewGuid().ToString("N").ToUpper();
            msftWebsite2.Add("url", "http://www.windowsazure.com");

            var batch = new TableBatchOperation();
            batch.Add(TableOperation.Insert(msftAddress1));
            batch.Add(TableOperation.Insert(msftWebsite1));
            batch.Add(TableOperation.Insert(msftWebsite2));
            customersMetadataTable.ExecuteBatch(batch);

            Console.WriteLine("Done. Press ENTER to read the customer metadata.");
            Console.ReadLine();
        }
开发者ID:sandrinodimattia,项目名称:WindowsAzure-DictionaryTableEntity,代码行数:32,代码来源:Program.cs

示例15: HomeController

        public HomeController()
        {
            storageAccount = CloudStorageAccount.Parse(
            ConfigurationManager.AppSettings["StorageConnectionString"]);

            tableClient = storageAccount.CreateCloudTableClient();

            table = tableClient.GetTableReference("fouramigos");

            table.CreateIfNotExists();

            blobClient = storageAccount.CreateCloudBlobClient();

            container = blobClient.GetContainerReference("fouramigos");

            container.CreateIfNotExists();

            BlobContainerPermissions permissions = container.GetPermissions();
            permissions.PublicAccess = BlobContainerPublicAccessType.Container;
            container.SetPermissions(permissions);


            //lägga till nya
            //var tablemodels = new TableModel("Brutus", "Uggla") { Location = "T4", Description="Uggla i träd", Type="Foto" };
            //var tablemodels1 = new TableModel("brutus", "Örn") { Location = "T4", Description="Örn som flyger", Type = "Foto" };

            //var opreation = TableOperation.Insert(tablemodels);
            //var operation2 = TableOperation.Insert(tablemodels1);

            //table.Execute(opreation);
            //table.Execute(operation2);
        }
开发者ID:Quintoh,项目名称:Konstprojektet,代码行数:32,代码来源:HomeController.cs


注:本文中的Microsoft.WindowsAzure.Storage.Table.CloudTableClient.GetTableReference方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。