Property | Type | Description | |
---|---|---|---|
CreateDocumentDbCollection | Task |
||
CreateDocumentDbDatabase | Task |
||
CreateGetRecentPhotosForCategoriesStoredProcedure | System.Threading.Tasks.Task | ||
CreatePhotoContractsAndLoadUserData | Task |
||
CreateTransferGoldStoredProcedure | System.Threading.Tasks.Task | ||
ExecuteGoldTransactionSproc | Task |
||
GetAllCategoryDocuments | Task |
||
GetAllUserDocumentsFromIdList | Task |
||
GetAnnotationDocument | |||
GetCategoryDocument | |||
GetHighestGivingUsers | Task |
||
GetHighestNetWorthCategories | Task |
||
GetHighestNetWorthPhotos | Task |
||
GetHighestNetWorthUser | Task |
||
GetParentPhotoDocument | |||
GetPhotoDocument | |||
GetUserDocumentByRegistrationReference | |||
GetUserDocumentByUserId | |||
InitializeStoredProceduresIfNotExisting | System.Threading.Tasks.Task | ||
ReplacePhotoDocument | Task |
||
ReplaceUserDocument | Task |
||
UpdateAnnotationDocument | System.Threading.Tasks.Task |
Method | Description | |
---|---|---|
CheckIfDatabaseAndCollectionExist ( ) : bool |
Checks if database and collection exist.
|
|
CreateCategory ( string name ) : Task |
Creates a new category with the provided name.
|
|
CreateUser ( string registrationReference ) : Task |
Inserts a new user record in the database.
|
|
DeleteAnnotation ( string annotationId, string userRegistrationReference ) : System.Threading.Tasks.Task |
Deletes an annotation.
|
|
DeletePhoto ( string photoId, string userRegistrationReference ) : System.Threading.Tasks.Task |
Deletes all the data for the provided photo id.
|
|
Dispose ( ) : void |
Initiates the process of releasing resources.
|
|
DocumentDbRepository ( |
The DocumentDbRepository constructor.
|
|
GetCategories ( ) : Task |
Fetches all the categories and sorts them by name.
|
|
GetCategoriesPreview ( int numberOfThumbnails ) : Task |
Retrieves all the categories that have atleast one photo and also retrieves number of provided thumbnails for the photos in each category.
|
|
GetCategoryPhotoStream ( string categoryId, string continuationToken = null ) : Task |
Fetches the photo stream data for a provided category.
|
|
GetHeroPhotos ( int count, int daysOld ) : Task |
Gets hero photos.
|
|
GetLeaderboard ( int mostGoldCategoriesCount, int mostGoldPhotosCount, int mostGoldUsersCount, int mostGivingUsersCount ) : Task |
Gets the leaderboard data.
|
|
GetPhoto ( string id ) : Task |
Gets the photo data for provided photo id.
|
|
GetPhotosWithStatus ( PhotoStatus status ) : Task |
Gets the list of photos with a specific status.
|
|
GetUser ( string userId, string registrationReference = null ) : Task |
Gets the user by an existing app user id OR registrationReference from Azure Mobile Services auth mechanism as the userId may not be known at time of entry.
|
|
GetUserPhotoStream ( string userId, string continuationToken, bool includeNonActivePhotos = false ) : Task |
Fetches the photo stream data for a specified user.
|
|
InitializeDatabaseIfNotExisting ( string serverPath ) : System.Threading.Tasks.Task |
Checks if the defined document database and collection exists and initializes them if they don't.
|
|
InsertAnnotation ( |
Inserts the annotation object and performs the required gold transactions.
|
|
InsertIapPurchase ( |
Inserts receipt and adds gold to user.
|
|
InsertPhoto ( |
Insert the photo object into storage.
|
|
InsertReport ( |
Inserts a report into Report table.
|
|
ReinitializeDatabase ( string serverPath ) : System.Threading.Tasks.Task |
Forces a reinitalization of the database by recreating the document database and collection.
|
|
UpdatePhoto ( |
Updates an existing photo object's category and description fields.
|
|
UpdatePhotoStatus ( |
Updates the status of the stored photo object.
|
|
UpdateUser ( |
Updates the user profile picture. User gold balance is also updated if it is the first time the user is updating their profile picture.
|
Method | Description | |
---|---|---|
Dispose ( bool disposing ) : void |
Releases resources.
|
Method | Description | |
---|---|---|
CreateDocumentDbCollection ( Microsoft.Azure.Documents.Database database ) : Task |
||
CreateDocumentDbDatabase ( ) : Task |
||
CreateGetRecentPhotosForCategoriesStoredProcedure ( string serverPath ) : System.Threading.Tasks.Task | ||
CreatePhotoContractsAndLoadUserData ( IList |
Processes a list of photo json documents and creates PhotoContract for them, as well as fetching and setting the proper UserContract objects for PhotoContract.User and AnnotationContract.From fields.
|
|
CreateTransferGoldStoredProcedure ( string serverPath ) : System.Threading.Tasks.Task | ||
ExecuteGoldTransactionSproc ( string toUserId, string fromUserId, int goldValue, GoldTransactionType transactionType, string photoId = null ) : Task |
||
GetAllCategoryDocuments ( ) : Task |
||
GetAllUserDocumentsFromIdList ( ICollection |
||
GetAnnotationDocument ( string annotationId ) : |
||
GetCategoryDocument ( string categoryId ) : |
||
GetHighestGivingUsers ( int count ) : Task |
||
GetHighestNetWorthCategories ( int count ) : Task |
||
GetHighestNetWorthPhotos ( int count ) : Task |
||
GetHighestNetWorthUser ( int count ) : Task |
||
GetParentPhotoDocument ( string annotationId ) : |
||
GetPhotoDocument ( string id ) : |
||
GetUserDocumentByRegistrationReference ( string registrationReference ) : |
||
GetUserDocumentByUserId ( string userId ) : |
||
InitializeStoredProceduresIfNotExisting ( string serverPath ) : System.Threading.Tasks.Task | ||
ReplacePhotoDocument ( |
||
ReplaceUserDocument ( |
||
UpdateAnnotationDocument ( |
public CheckIfDatabaseAndCollectionExist ( ) : bool | ||
return | bool |
public CreateCategory ( string name ) : Task |
||
name | string | The category name to be created. |
return | Task |
public CreateUser ( string registrationReference ) : Task |
||
registrationReference | string | The Azure Mobile Service user id. |
return | Task |
public DeleteAnnotation ( string annotationId, string userRegistrationReference ) : System.Threading.Tasks.Task | ||
annotationId | string | Id of annotation to be deleted. |
userRegistrationReference | string | userRegistrationReference of annotation to be deleted. |
return | System.Threading.Tasks.Task |
public DeletePhoto ( string photoId, string userRegistrationReference ) : System.Threading.Tasks.Task | ||
photoId | string | Id of the photo to be deleted. |
userRegistrationReference | string | Azure Mobile Service user id. |
return | System.Threading.Tasks.Task |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | If we need to release resources or not. |
return | void |
public DocumentDbRepository ( |
||
environmentDefinition | The specified environment definition. | |
return | System |
public GetCategoriesPreview ( int numberOfThumbnails ) : Task |
||
numberOfThumbnails | int | Max number of thumbnails per category. |
return | Task |
public GetCategoryPhotoStream ( string categoryId, string continuationToken = null ) : Task |
||
categoryId | string | The category id. |
continuationToken | string | Continuation token from previous |
return | Task |
public GetHeroPhotos ( int count, int daysOld ) : Task |
||
count | int | The number of hero photos. |
daysOld | int | The number of days old the photos can be. |
return | Task |
public GetLeaderboard ( int mostGoldCategoriesCount, int mostGoldPhotosCount, int mostGoldUsersCount, int mostGivingUsersCount ) : Task |
||
mostGoldCategoriesCount | int | Count of categories. |
mostGoldPhotosCount | int | Count of photos. |
mostGoldUsersCount | int | Count of wealthiest users. |
mostGivingUsersCount | int | Count of most giving users. |
return | Task |
public GetPhotosWithStatus ( PhotoStatus status ) : Task |
||
status | PhotoStatus | The photo status. |
return | Task |
public GetUser ( string userId, string registrationReference = null ) : Task |
||
userId | string | The app user id. |
registrationReference | string | [Optional] The Azure App Service user id. Default value is null. |
return | Task |
public GetUserPhotoStream ( string userId, string continuationToken, bool includeNonActivePhotos = false ) : Task |
||
userId | string | The user id. |
continuationToken | string | Last captured ticks in the form of a string. |
includeNonActivePhotos | bool | By default, false. If true, non-active photos are included. |
return | Task |
public InitializeDatabaseIfNotExisting ( string serverPath ) : System.Threading.Tasks.Task | ||
serverPath | string | |
return | System.Threading.Tasks.Task |
public InsertAnnotation ( |
||
annotationContract | Annotation to be inserted. | |
return | Task |
public InsertIapPurchase ( |
||
validatedIapReciept | Validated receipt values. | |
return | Task |
public InsertPhoto ( |
||
photo | Photo Object. | |
goldIncrement | int | Gold to award for new photo. |
return | Task |
public InsertReport ( |
||
reportContract | The report being inserted. | |
userRegistrationReference | string | Azure Mobile Service user id who is reporting it. |
return | Task |
public ReinitializeDatabase ( string serverPath ) : System.Threading.Tasks.Task | ||
serverPath | string | |
return | System.Threading.Tasks.Task |
public UpdatePhoto ( |
||
photoContract | Photo object. | |
return | Task |
public UpdatePhotoStatus ( |
||
photoContract | Photo object. | |
return | Task |
public UpdateUser ( |
||
userContract | /// We need the whole user object as it is assumed the client will have given the photoId and /// url. /// | |
return | Task |