GetSchemas() public method

Get details of all schemas in the project.
public GetSchemas ( ) : Task
return Task
Beispiel #1
0
 /// <summary>
 /// Return schema information for all the event collections in this project.
 /// </summary>
 /// <returns></returns>
 public JArray GetSchemas()
 {
     try
     {
         return(Event.GetSchemas().Result);
     }
     catch (AggregateException ex)
     {
         throw ex.TryUnwrap();
     }
 }
Beispiel #2
0
        /// <summary>
        /// Return schema information for all the event collections in this project.
        /// </summary>
        /// <returns></returns>
        public async Task <JArray> GetSchemasAsync()
        {
            // Preconditions
            if (string.IsNullOrWhiteSpace(_prjSettings.MasterKey))
            {
                throw new KeenException("Master API key is required for GetSchemas");
            }

            return(await Event.GetSchemas()
                   .ConfigureAwait(continueOnCapturedContext: false));
        }