// 프로필 이미지 가져오기 public void GetImage(string userId, CollectionName collectionName) { imageList.Add(userId + "/" + collectionName.ToString()); SocketConnection.GetInstance().Send("Image", userId); }
internal async Task <Uri> InitializeCollection(CollectionName collection) { if (_collectionUris.ContainsKey(collection)) { return(_collectionUris[collection]); } var databaseUri = UriFactory.CreateDatabaseUri(ConnectionSettings.DatabaseId); await DocumentClient.CreateDatabaseIfNotExistsAsync(new Database { Id = ConnectionSettings.DatabaseId }); await DocumentClient.CreateDocumentCollectionIfNotExistsAsync(databaseUri, new DocumentCollection { Id = collection.ToString() }); lock (_collectionUris) { var uri = UriFactory.CreateDocumentCollectionUri(ConnectionSettings.DatabaseId, collection.ToString()); _collectionUris[collection] = uri; return(uri); } }
internal Uri CreateDocumentUri(CollectionName collection, string documentId) { return(UriFactory.CreateDocumentUri(ConnectionSettings.DatabaseId, collection.ToString(), documentId)); }
public static string ToCollectionName(this CollectionName collectionName) { return(collectionName.ToString().ToLowerInvariant()); }