public ReplyManager() { _reply = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Reply); _replyNotification = AzureFactory.GetTable(AzureFactory.MSGorillaTable.ReplyNotification); _replyArchive = AzureFactory.GetTable(AzureFactory.MSGorillaTable.ReplyArchive); _userline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Userline); _accManager = new AccountManager(); _notifManager = new NotifManager(); _richMsgManager = new RichMsgManager(); }
public int GetUserPostMessageCountByDateUtc(string userid, DateTime date) { CloudTable userline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Userline).AzureTable; string query = TableQuery.GenerateFilterCondition( "PartitionKey", QueryComparisons.Equal, string.Format("{0}_{1}", userid, Utils.ToAzureStorageDayBasedString(date))); TableQuery tableQuery = new TableQuery().Where(query); int count = userline.ExecuteQuery(tableQuery).Count(); Logger.Debug(string.Format("{0} post {1} messages in {2:yyyy-MM-dd}", userid, count, date.ToUniversalTime().Date)); return(count); }
public StatisticsManager() { _homeline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Homeline); _userline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Userline); _eventline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.EventLine); _publicSquareLine = AzureFactory.GetTable(AzureFactory.MSGorillaTable.PublicSquareLine); _topicline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.TopicLine); _ownerline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.OwnerLine); _atline = AzureFactory.GetTable(Azure.AzureFactory.MSGorillaTable.AtLine); _reply = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Reply); _accManager = new AccountManager(); _attManager = new AttachmentManager(); _schemaManager = new SchemaManager(); _notifManager = new NotifManager(); _topicManager = new TopicManager(); _richMsgManager = new RichMsgManager(); }
public int GetTotalRobotMessageCountByDateUtc(DateTime date) { int count = 0; List <string> robitID = GetCurrentRobotID(); CloudTable userline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Userline).AzureTable; foreach (string userid in robitID) { try { count += GetUserPostMessageCountByDateUtc(userid, date); } catch (Exception e) { Logger.Error(e.ToString()); } } Logger.Info(string.Format("Robots posted {0} messages totally in {1:yyyy-MM-dd}", count, date.ToUniversalTime())); return(count); }
public MessageManager() { _homeline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Homeline); _userline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Userline); _eventline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.EventLine); _publicSquareLine = AzureFactory.GetTable(AzureFactory.MSGorillaTable.PublicSquareLine); _topicline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.TopicLine); _ownerline = AzureFactory.GetTable(AzureFactory.MSGorillaTable.OwnerLine); _atline = AzureFactory.GetTable(Azure.AzureFactory.MSGorillaTable.AtLine); _reply = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Reply); _queue = AzureFactory.GetQueue(AzureFactory.MSGorillaQueue.Dispatcher); _spiderqueue = AzureFactory.GetQueue(AzureFactory.MSGorillaQueue.SearchEngineSpider); _mailMessageQueue = AzureFactory.GetQueue(AzureFactory.MSGorillaQueue.MailMessage); _accManager = new AccountManager(); _attManager = new AttachmentManager(); _schemaManager = new SchemaManager(); _notifManager = new NotifManager(); _topicManager = new TopicManager(); _richMsgManager = new RichMsgManager(); _groupManager = new GroupManager(); }
public AttachmentManager() { _attachment = AzureFactory.GetTable(AzureFactory.MSGorillaTable.Attachment); _blobcontainer = AzureFactory.GetBlobContainer(AzureFactory.MSGorillaBlobContainer.Attachment); BlobContainerPermissions blobPermissions = new BlobContainerPermissions(); blobPermissions.SharedAccessPolicies.Add(_policyName, new SharedAccessBlobPolicy() { // To ensure SAS is valid immediately, don’t set start time. // This way, you can avoid failures caused by small clock differences. SharedAccessExpiryTime = DateTime.UtcNow.AddHours(1), Permissions = SharedAccessBlobPermissions.Read }); // The public access setting explicitly specifies that // the container is private, so that it can't be accessed anonymously. blobPermissions.PublicAccess = BlobContainerPublicAccessType.Off; // Set the permission policy on the container. _blobcontainer.SetPermissions(blobPermissions); // Get the shared access signature to share with users. }
public MetricManager() { _metricData = AzureFactory.GetTable(AzureFactory.MSGorillaTable.MetricDataSet); }
public CounterManager() { _counterSet = AzureFactory.GetTable(AzureFactory.MSGorillaTable.CounterSet); _counterRecord = AzureFactory.GetTable(AzureFactory.MSGorillaTable.CounterRecord); }
public SearchManager() { _wordsIndexTable = AzureFactory.GetTable(AzureFactory.MSGorillaTable.WordsIndex); _searchResultsTable = AzureFactory.GetTable(AzureFactory.MSGorillaTable.SearchResults); _searchHistoryTable = AzureFactory.GetTable(AzureFactory.MSGorillaTable.SearchHistory); }
public RichMsgManager() { _richMsg = AzureFactory.GetTable(AzureFactory.MSGorillaTable.RichMessage); }