/// <summary> /// Creates a team and returns it /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='team'> /// The information used to create the team /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> CreateTeamAsync(this ITeams operations, string orgName, TeamRequest team = default(TeamRequest), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.CreateTeamWithHttpMessagesAsync(orgName, team, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Returns the users of a team which is owned by an organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TeamUserResponse> GetUsersAsync(this ITeams operations, string orgName, string teamName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetUsersWithHttpMessagesAsync(orgName, teamName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Adds a new user to a team that is owned by an organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> /// <param name='userEmail'> /// The email of the user to add to the team /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <TeamUserResponse> AddUserAsync(this ITeams operations, string orgName, string teamName, UserEmailRequest userEmail = default(UserEmailRequest), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddUserWithHttpMessagesAsync(orgName, teamName, userEmail, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Adds an app to a team /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> /// <param name='app'> /// The name of the app to be added to the team. The app has to be owned by the /// organization. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <AppWithTeamPermissionsResponse> AddAppAsync(this ITeams operations, string orgName, string teamName, AppAddRequest app, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.AddAppWithHttpMessagesAsync(orgName, teamName, app, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { this.Consultants = new Consultants(this); this.Customers = new Customers(this); this.Dashboard = new Dashboard(this); this.Teams = new Teams(this); this.BaseUri = new Uri("http://localhost:57216"); SerializationSettings = new JsonSerializerSettings { Formatting = Formatting.Indented, DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = DateTimeZoneHandling.Utc, NullValueHandling = NullValueHandling.Ignore, ReferenceLoopHandling = ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
/// <summary> /// Returns the list of all teams in this org /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <TeamResponse> > ListAllAsync(this ITeams operations, string orgName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListAllWithHttpMessagesAsync(orgName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
public UserController(IUser _IUser, ITeams _ITeams, IUserTeam _IUserTeam, IAvailability _IAvailability, IConfiguration configuration) { _User = _IUser; _Teams = _ITeams; _UserTeam = _IUserTeam; _Availability = _IAvailability; _configuration = configuration; }
/// <param name='operations'> /// Reference to the AppServiceOverview.Windows.FrcRank.ITeams. /// </param> /// <param name='id'> /// Required. /// </param> public static Team GetById(this ITeams operations, int id) { return(Task.Factory.StartNew((object s) => { return ((ITeams)s).GetByIdAsync(id); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// Reference to the AppServiceOverview.Windows.FrcRank.ITeams. /// </param> /// <param name='triggerState'> /// Required. /// </param> /// <param name='id'> /// Required. /// </param> public static Team GetRankUpdatedTriggerByTriggerstateAndId(this ITeams operations, string triggerState, int id) { return(Task.Factory.StartNew((object s) => { return ((ITeams)s).GetRankUpdatedTriggerByTriggerstateAndIdAsync(triggerState, id); } , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
public TeamController(IAvailability _IAvailability, ICalendar _ICalendar, IUser _IUser, ITeams _ITeams, IUserTeam _IUserTeam, DB_Context context) { _Calendar = _ICalendar; _User = _IUser; _Teams = _ITeams; _UserTeam = _IUserTeam; _context = context; _Availability = _IAvailability; }
public TeamsController(CricketContext context, UserManager <IdentityUser <int> > userManager, IMapper mapper, ITeams teams ) { _context = context; _userManager = userManager; _mapper = mapper; _teams = teams; }
public TeamsController(CricketContext context, UserManager <ApplicationUser> userManager, IMapper mapper, ITeams teams, IHostingEnvironment hosting ) { _context = context; _userManager = userManager; _mapper = mapper; _teams = teams; _hosting = hosting; }
public void Setup() { client = new Mock <IProxy>(); request = new Mock <BaseRequest>(new Mock <IProxy>().Object); request.CallBase = true; // Create proxy instance teamsProxy = new AxosoftAPI.NET.Teams(client.Object); teamsProxy = new AxosoftAPI.NET.Teams(request.Object); }
/// <param name='operations'> /// Reference to the AppServiceOverview.Windows.FrcRank.ITeams. /// </param> /// <param name='triggerState'> /// Required. /// </param> /// <param name='id'> /// Required. /// </param> /// <param name='cancellationToken'> /// Cancellation token. /// </param> public static async Task <Team> GetRankUpdatedTriggerByTriggerstateAndIdAsync(this ITeams operations, string triggerState, int id, CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { Microsoft.Rest.HttpOperationResponse <AppServiceOverview.Windows.FrcRank.Models.Team> result = await operations.GetRankUpdatedTriggerByTriggerstateAndIdWithOperationResponseAsync(triggerState, id, cancellationToken).ConfigureAwait(false); return(result.Body); }
/// <summary> /// Initializes a new instance of the Frcrankapi01 class. /// </summary> public Frcrankapi01() : base() { this._teams = new Teams(this); this._baseUri = new Uri("https://microsoft-apiappf6fa5484ea724b0085c8d603f47f8719.azurewebsites.net"); }
/// <summary> /// Returns the apps a team has access to /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> public static IList <AppWithTeamPermissionsResponse> ListApps(this ITeams operations, string orgName, string teamName) { return(operations.ListAppsAsync(orgName, teamName).GetAwaiter().GetResult()); }
/// <summary> /// Adds an app to a team /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> /// <param name='app'> /// The name of the app to be added to the team. The app has to be owned by the /// organization. /// </param> public static AppWithTeamPermissionsResponse AddApp(this ITeams operations, string orgName, string teamName, AppAddRequest app) { return(operations.AddAppAsync(orgName, teamName, app).GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='consultantId'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ContosoConsultancyRestModelsTeamsTeamModel> DeleteMemberAsync(this ITeams operations, long id, long consultantId, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.DeleteMemberWithHttpMessagesAsync(id, consultantId, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='id'> /// </param> /// <param name='consultantId'> /// </param> public static ContosoConsultancyRestModelsTeamsTeamModel PutManager(this ITeams operations, long id, long consultantId) { return(Task.Factory.StartNew(s => ((ITeams)s).PutManagerAsync(id, consultantId), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// </param> public static ContosoConsultancyRestModelsTeamsTeamModel PostTeam(this ITeams operations, string name) { return(Task.Factory.StartNew(s => ((ITeams)s).PostTeamAsync(name), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Returns the list of all teams in this org /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> public static IList <TeamResponse> ListAll(this ITeams operations, string orgName) { return(operations.ListAllAsync(orgName).GetAwaiter().GetResult()); }
/// <summary> /// Removes a user from a team that is owned by an organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> /// <param name='userName'> /// The slug name of the user /// </param> public static void RemoveUser(this ITeams operations, string orgName, string teamName, string userName) { operations.RemoveUserAsync(orgName, teamName, userName).GetAwaiter().GetResult(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> public static IList <ContosoConsultancyRestModelsTeamsTeamModel> GetTeams(this ITeams operations) { return(Task.Factory.StartNew(s => ((ITeams)s).GetTeamsAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Deletes a single team /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> public static void Delete(this ITeams operations, string orgName, string teamName) { operations.DeleteAsync(orgName, teamName).GetAwaiter().GetResult(); }
/// <summary> /// Returns the users of a team which is owned by an organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> public static TeamUserResponse GetUsers(this ITeams operations, string orgName, string teamName) { return(operations.GetUsersAsync(orgName, teamName).GetAwaiter().GetResult()); }
/// <summary> /// Updates a single team /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> /// <param name='team'> /// The information used to create the team /// </param> public static TeamResponse Update(this ITeams operations, string orgName, string teamName, TeamRequest team = default(TeamRequest)) { return(operations.UpdateAsync(orgName, teamName, team).GetAwaiter().GetResult()); }
/// <summary> /// Initializes a new instance of the Frcrankapi01 class. /// </summary> /// <param name='rootHandler'> /// Optional. The http client handler used to handle http transport. /// </param> /// <param name='handlers'> /// Optional. The set of delegating handlers to insert in the http /// client pipeline. /// </param> public Frcrankapi01(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) { this._teams = new Teams(this); this._baseUri = new Uri("https://microsoft-apiappf6fa5484ea724b0085c8d603f47f8719.azurewebsites.net"); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='name'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ContosoConsultancyRestModelsTeamsTeamModel> PostTeamAsync(this ITeams operations, string name, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.PostTeamWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Removes a user from a team that is owned by an organization /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='teamName'> /// The team's name /// </param> /// <param name='userName'> /// The slug name of the user /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task RemoveUserAsync(this ITeams operations, string orgName, string teamName, string userName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.RemoveUserWithHttpMessagesAsync(orgName, teamName, userName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Creates a team and returns it /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='orgName'> /// The organization's name /// </param> /// <param name='team'> /// The information used to create the team /// </param> public static object CreateTeam(this ITeams operations, string orgName, TeamRequest team = default(TeamRequest)) { return(operations.CreateTeamAsync(orgName, team).GetAwaiter().GetResult()); }