예제 #1
0
        /// <summary>
        /// Create a controller of the given type
        /// </summary>
        /// <param name="type">
        /// The type.
        /// </param>
        /// <param name="context">
        /// The context.
        /// </param>
        /// <returns>
        /// The <see cref="IController"/>.
        /// </returns>
        public static IController CreateController(ControllerType type, IOrion context)
        {
            switch (type)
            {
            case ControllerType.Authentication:
            {
                return(new AuthenticationController(context));
            }

            case ControllerType.User:
            {
                return(new UserController(context));
            }

            case ControllerType.Organisation:
            {
                return(new OrganisationController(context));
            }

            default:
                return(null);
            }
        }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConversationController"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public ConversationController(IOrion context)
 {
     this.Context = context;
 }
예제 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UserController"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public UserController(IOrion context)
 {
     this.Context = context;
 }
예제 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationController"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public AuthenticationController(IOrion context)
 {
     this.Context = context;
 }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="OrganisationController"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public OrganisationController(IOrion context)
 {
     this.Context = context;
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebhookController"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public WebhookController(IOrion context)
 {
     this.Context = context;
 }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiCommunicator"/> class.
 /// </summary>
 /// <param name="context">
 /// The orion context.
 /// </param>
 public ApiCommunicator(IOrion context)
 {
     this.context = context;
 }