-
Notifications
You must be signed in to change notification settings - Fork 0
Code documentation
Hosting startup class to add Identity services in the app
Method call at runtime to configure Identity
Name | Description |
---|---|
builder |
Microsoft.AspNetCore.Hosting.IWebHostBuilder |
Access denied page model.
Append when the access denied page is GET
Forgat password confirmation page model
Append when the forgot password confirmation page is GET
Lockout page model
Append when Lokout page is GET
Logout page model
Constructor with dependencies
Name | Description |
---|---|
signInManager |
Microsoft.AspNetCore.Identity.SignInManager{Microsoft.AspNetCore.Identity.IdentityUser} |
logger |
Microsoft.Extensions.Logging.ILogger{AzureDevOpsTeamMembersVelocity.Areas.Identity.Pages.Account.LogoutModel} |
authUrlPages |
AzureDevOpsTeamMembersVelocity.Services.AuthUrlPagesProvider |
Append when logout page is GET
Append on POST of Logout page. Logout the user. This method is used in the Identity and AzureAD authentication method.
Name | Description |
---|---|
returnUrl |
System.String Url to redirect to after user is logout |
Input model of the Delete Personal Data page
Input model of the Delete Personal Data page
The password of the user
AzureDevOpsTeamMembersVelocity.Areas.Identity.Pages.Account.Manage.DeletePersonalDataModel.RequirePassword
Indicate if it required password
Disable Two-Factor authentication page model
Email page model
Constructor(Microsoft.AspNetCore.Identity.UserManager{Microsoft.AspNetCore.Identity.IdentityUser},Microsoft.AspNetCore.Identity.UI.Services.IEmailSender)
Constructor with dependencies
Input model of the email page
New email field
Is email confirmed
Status message
Username
External login page model
Constructor with dependencies
Name | Description |
---|---|
userManager |
Microsoft.AspNetCore.Identity.UserManager{Microsoft.AspNetCore.Identity.IdentityUser} |
signInManager |
Microsoft.AspNetCore.Identity.SignInManager{Microsoft.AspNetCore.Identity.IdentityUser} |
Generate recovery code page model
Index model page
Constructor with dependencies
Name | Description |
---|---|
userManager |
Microsoft.AspNetCore.Identity.UserManager{Microsoft.AspNetCore.Identity.IdentityUser} |
signInManager |
Microsoft.AspNetCore.Identity.SignInManager{Microsoft.AspNetCore.Identity.IdentityUser} |
Input model of the Index page
Input model of the Index page
The phone number of the user
Append when Index page is GET
Append on POST of the Index page.
Status message to show the user
The username
Personal data page model
Constructor with dependencies
Name | Description |
---|---|
userManager |
Microsoft.AspNetCore.Identity.UserManager{Microsoft.AspNetCore.Identity.IdentityUser} |
Append personal data page is GET.
Register confirmation page model
Constructor with dependencies
Name | Description |
---|---|
userManager |
Microsoft.AspNetCore.Identity.UserManager{Microsoft.AspNetCore.Identity.IdentityUser} |
Register page model
Constructor with dependencies
Name | Description |
---|---|
userManager |
Microsoft.AspNetCore.Identity.UserManager{Microsoft.AspNetCore.Identity.IdentityUser} |
signInManager |
Microsoft.AspNetCore.Identity.SignInManager{Microsoft.AspNetCore.Identity.IdentityUser} |
logger |
Microsoft.Extensions.Logging.ILogger{AzureDevOpsTeamMembersVelocity.Areas.Identity.Pages.Account.RegisterModel} |
emailSender |
Microsoft.AspNetCore.Identity.UI.Services.IEmailSender |
Input model of the register page
The password confirmation
The email of the user, also uses for the username.
The password of the user
Reset password confirmation page model.
Append when resetting password confirmation model page is GET.
Handler use when no authentification is configured
When no authentification method is configured, this authorization handler is used.
Controller used to manage redirection with Microsoft to login and logout users.
Login method to handle Microsoft authentication
Name | Description |
---|---|
returnUrl |
System.String The returnUrl use after the Microsoft authentication is completed |
The dbContext class is used when the environment variable USE_IDENTITY is set to true. This class has been auto-generated by a scaffolding tool.
Constructor used to instantiate an IdentityContext
Name | Description |
---|---|
options |
Microsoft.EntityFrameworkCore.DbContextOptions{AzureDevOpsTeamMembersVelocity.Data.IdentityContext} |
A class that handles the authorization configuration of the app. There or 4 possible modes of authentication. 1. No auth; if there is nothing configure about the authorization, then the app will work without any auth. 2. CookieAuth, if there is a COOKIEAUTH_USER defined. Then this user will have to log in to use the app. You can set a password with the COOKIE_PASSWORD environment variable. 3. Identity, if the environment variable USE_IDENTITY is set to true, Microsoft.Identity will be used with the SQLite database. 4. Microsoft account, if the environment variable MicrosoftId is initialized, then Microsoft account will be used. MicrosoftId represents the ClientId, and MicrosoftSecret is the secret create in the AzureAD client credentials section.
You can use only one authentication method at a time. Otherwise, the application will throw an InvalidProgramException.
AddTeamMemberVelocityAutorisation(Microsoft.Extensions.DependencyInjection.IServiceCollection,Microsoft.Extensions.Configuration.IConfiguration)
System.InvalidProgramException:
Extension class to help work with the Fields property of Microsoft DevOps models
TryGet the value of the corresponding key. If the value is present, a cast is applied, and the value is returned.
- T - Type of the corresponding value
System.ArgumentNullException:
System.InvalidCastException:
TryGet the value of the corresponding key. If the value is present, a cast is applied, and the value is returned.
- T - Type of the corresponding value
System.ArgumentNullException:
System.InvalidCastException:
Get the value of a corresponding key. If the value is present, ToString is called on the object and System.Json.Text deserialization will be executed on this value.
System.ArgumentNullException:
System.Text.Json.JsonException:
System.NotSupportedException:
Get the value of a corresponding key or null of the dictionary does not contain the key.
System.ArgumentNullException:
Extension to help to work with JSON data
Transform a string a formatted JSON string
Newtonsoft.Json.JsonReaderException:
The object used to deserialize list response from the Azure DevOps REST API.
- T - Type of the resource
The quantity of element
The list of resource
An object containing a link
Href or link
System.UriFormatException:
Uri instance of the Href property
The descriptor field in the REST response
MemberVelocity is the model used to display stat about the velocity of a member.
The capacity saved. Normally based on the response of the Capacity REST API.
The name of the member
Compare two objects; if it is of type MemberVelocity, the comparer will use only the DisplayName. Otherwise, it is the object.Equals(this, obj) that is going to be called
Name | Description |
---|---|
obj |
System.Object |
Get the hashcode of the member velocity object.
The hours of work done. Normally calculated from the History according to the member.
Estimated calculation of the real capacity of a member.
Return the name of the member velocity instance.
List of WorkItemUpdate associate to this member
Representation of the sprint resource of the Azure DevOps API
The attributes of the sprint. Such as Start Date, Finish Date, and TimeFrame
Calculate the number of total days between the Start Date and the FinishDate
Get total working days of a sprint.
Ensure to pass non-null reference for each parameter. It will allow the function to do the right calculation. Since each parameter ar consider if they are not null.
Name | Description |
---|---|
workingDays |
System.DayOfWeek[] List of working days |
teamDaysOff |
Microsoft.TeamFoundation.Work.WebApi.TeamSettingsDaysOff TeamDaysOff information |
GetTotalDays() - days off
Id of the sprint
Links related to the sprint
Name of the sprint
The Path of the sprint
The Url of the sprint
The attributes of a sprint
Finish date
Start date
TimeFrame, current, past.
Links related to a sprint
Link to get capacity information of the sprint
The classification node of the sprint
Link of the project of the sprint
Link of the sprint itself
Link of the team
Link to get days off of the sprint
The link of the iterations
The team settings link
Link to get related work item
Work item links object
The work item Fields URL
The work item Html URL
The work item URL
The work comments URL
The work item revisions URL
The work item Type URL
The work item updates URL
A work item graph
Work item URL
List of related work item
Compare a WorkItemUpdate base on the RelatedTaskTitle and if the save the RevisedDate
The title of the associate WorkItem.
Must be managed by the program logic. This data is not in the response of Azure DevOps REST API.
ErrorModel code generated by the dotnet new command
The OnGet Method of the page
ResquestId associate with the error
Indicated if RequestId can be shown. (If not NullOrEmpty)
The entry point of the program. It also contains settings to use for System.Text.Json serialization.
Create the host builder with some default settings
Name | Description |
---|---|
args |
System.String[] Main method args |
A new HostBuilder
The entry point of the program
Name | Description |
---|---|
args |
System.String[] |
System.Text.Json SerializerOptions to use in serialization in the app.
DevOpsProxy class is used to call Azure DevOps REST API. Implement rate-limiting and ensure URL validation.
Constructor with dependencies
Name | Description |
---|---|
client |
System.Net.Http.HttpClient HttpClient to used |
appSettings |
AzureDevOpsTeamMembersVelocity.TeamMembersVelocitySettings App settings, to acces AuthenticationHeader |
logger |
Microsoft.Extensions.Logging.ILogger{AzureDevOpsTeamMembersVelocity.Proxy.DevOpsProxy} Logger to log information and critical error |
Get the body content of a response according to a fullUrl
Name | Description |
---|---|
fullUrl |
System.String Complete URL of the resource to fetch. Must start with https://dev.azure.com/ |
The response body as a string
Get the body content of a response according to a fullUrl
- T - Type used in deserialization
Name | Description |
---|---|
fullUrl |
System.String Complete URL of the resource to fetch. Must start with https://dev.azure.com/ |
The response body Deserialized as T
The interface of to represent an Azure DevOps Proxy
Get the body of a request as a string.
Name | Description |
---|---|
fullUrl |
System.String The full URL of the DevOps resource |
The body as a string
Get and deserialize a resource.
- T - Type of the resource
Name | Description |
---|---|
fullUrl |
System.String The full URL of the DevOps resource |
An instance of the response deserialize
Provider allows to get information about the authentication method used in the app and get basic URL to handle authentication scenario.
Constructor with the authentication schema used.
Name | Description |
---|---|
schema |
System.String Cookies, Identity.Application, AzureAD, or string.Empty |
Indicate if the authentication is enabled in the app
Indicate if the schema is Identity.Application
Return the URL of the login page
Return the URL to the POST method to log out
The schema that is used by the application
Classed used to call and deserialize resource from the Azure DevOps REST API
Constructor with dependencies
Name | Description |
---|---|
proxy |
AzureDevOpsTeamMembersVelocity.Proxy.IDevOpsProxy The proxy used to call the REST API |
Get the capacity of a sprint given a full URL
api-version 6.0 is used
Name | Description |
---|---|
capacityUrl |
System.String The full URL of the capacity information. |
The list of capacities
Get the list of projects of an organization.
See Microsoft doc : https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-6.0
Name | Description |
---|---|
organization |
System.String Name of the organization. https://dev.azure.com/{organization} |
List of TeamProject
Get the sprint given a full URL
api-version 6.0 is used
Name | Description |
---|---|
sprintUrl |
System.String The full URL of the sprint. |
The instance of the sprint
Get the list of sprints of a team.
Name | Description |
---|---|
organization |
System.String Name of the organisation. https://dev.azure.com/{organisation} |
project |
System.String |
team |
System.String |
Get team days off from the teamIterationDaysOffUrl passed and deserialize the response.
The api-version used is 6.0, and the caller is not expected to specify the version in the URL.
Name | Description |
---|---|
teamIterationDaysOffUrl |
System.String URL of team days off to fetch |
Return the list of Teams of an organization TeamProject
Name | Description |
---|---|
organization |
System.String Name of the organization. https://dev.azure.com/{organization} |
teamProjectId |
System.Guid Id of the organization team project selected |
List of teams
Get Team Settings given a team settings URL
api-version 6.0 is used
Name | Description |
---|---|
teamSettingsUrl |
System.String The teamSettings full URL without the api-version |
The teamSetting instance
Get the list of updates from the updatesUrl passed and deserialize the response.
The api-version used is 6.0, and the caller is not expected to specify the version in the URL.
Name | Description |
---|---|
updatesUrl |
System.String URL of updates to fetch |
Get a workItem given a workItemUrl
Name | Description |
---|---|
workItemUrl |
System.String workItem fullUrl |
The WorkItem deserialized
Get the list of work item links given the URL of the sprint.
Name | Description |
---|---|
sprintUrl |
System.String The URL of the sprint has returned by the DevOpsService.Sprints(System.String,System.String,System.String) method/> |
A work item with details
Service use to aggregate and group history of a sprint
Constructor with dependencies
Name | Description |
---|---|
devOpsService |
AzureDevOpsTeamMembersVelocity.Services.DevOpsService Instance of DevOpsService use to fetch data needed |
Group the list of updates into the MemberVelocity object associate with the person name
Name | Description |
---|---|
groupByPerson |
System.Collections.Generic.Dictionary{System.String,AzureDevOpsTeamMembersVelocity.Model.MemberVelocity} Dictionary used to to the group by, can be pre-populated |
workItem |
AzureDevOpsTeamMembersVelocity.Model.WorkItem Work item |
workItemUpdates |
System.Collections.Generic.List{AzureDevOpsTeamMembersVelocity.Model.WorkItemUpdate} List of updates to group |
Asynchronously enumerate each member's velocity. Previously return member also updates if needed at each iteration.
Name | Description |
---|---|
sprintUrl |
System.String Sprint to analyse |
capacities |
System.Collections.Generic.List{AzureDevOpsTeamMembersVelocity.Model.Capacity} Capacities informations to enhance result |
sprint |
AzureDevOpsTeamMembersVelocity.Model.Sprint Sprint information is use to enhance result |
teamDaysOff |
Microsoft.TeamFoundation.Work.WebApi.TeamSettingsDaysOff Team days off is use to enhance result and do the right calculation |
teamSettings |
Microsoft.TeamFoundation.Work.WebApi.TeamSetting Team settings is use to enhance result and do the right calculation |
The startup class uses to build the application.
The constructor of the startup class with the configuration object in the parameter
Name | Description |
---|---|
configuration |
Microsoft.Extensions.Configuration.IConfiguration |
Configuration of the app. Use when the AzureAD authentication method is used.
Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder,Microsoft.AspNetCore.Hosting.IWebHostEnvironment,System.IServiceProvider)
This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
This method gets called by the runtime. Use this method to add services to the container. For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
Name | Description |
---|---|
services |
Microsoft.Extensions.DependencyInjection.IServiceCollection |
This is the main configuration of the app. Those settings can be saved on disk using the persist button on the index.html page.
The ApiKey of the user
Return the Authentication header object that can be used by assigned this property to the Authorization property of System.Net.Http.HttpClient.DefaultRequestHeaders the Azure DevOps REST API
Organization selected
Team selected
Team project selected
Team project resource of the Azure DevOps REST API
Id of the TeamProject
Last time updated
Name of the team project
Revision of the TeamProject
State of the TeamProject
Url of the TeamProject
Visibility of the team project