/// <summary> /// Initializes a new instance of <see cref="RepositoryActor"/>. /// </summary> /// <param name="actorService">The ActorService context.</param> /// <param name="actorId">The Actor ID.</param> /// <param name="gitClient">The <see cref="GitHttpClient"/> to use on repo operations.</param> /// <param name="vstsConfiguration">The VSTS configuration payload.</param> /// <param name="bb">big brother instance</param> public RepositoryActor(ActorService actorService, ActorId actorId, GitHttpClient gitClient, VstsConfiguration vstsConfiguration, IBigBrother bb) : base(actorService, actorId) { _gitClient = gitClient; _vstsConfiguration = vstsConfiguration; _bigBrother = bb; }
/// <summary> /// Initializes a new instance of BuildDefinitionActor /// </summary> /// <param name="actorService">instance of <see cref="ActorService"/> that will host this actor instance.</param> /// <param name="actorId">instance of <see cref="ActorId"/> for this actor instance.</param> /// <param name="buildHttpClient">http build client</param> /// <param name="vstsConfig">vsts configuration</param> /// <param name="bb">big brother instance</param> public BuildDefinitionActor(ActorService actorService, ActorId actorId, BuildHttpClient buildHttpClient, VstsConfiguration vstsConfig, IBigBrother bb) : base(actorService, actorId) { _buildHttpClient = buildHttpClient; _vstsConfiguration = vstsConfig; _bigBrother = bb; }
/// <inheritdoc /> protected override void Load(ContainerBuilder builder) { builder.Register(c => { var vstsConfig = new VstsConfiguration(); c.Resolve <IConfigurationRoot>().Bind(vstsConfig); return(vstsConfig); }) .SingleInstance(); builder.Register(c => new VssBasicCredential(string.Empty, c.Resolve <VstsConfiguration>().VstsPat)) .SingleInstance(); builder.Register(c => new VssConnection( new Uri(c.Resolve <VstsConfiguration>().VstsBaseUrl), c.Resolve <VssBasicCredential>())) .InstancePerDependency(); builder.Register(c => c.Resolve <VssConnection>().GetClient <GitHttpClient>()) .InstancePerDependency(); builder.Register(c => c.Resolve <VssConnection>().GetClient <BuildHttpClient>()) .InstancePerDependency(); builder.Register(c => c.Resolve <VssConnection>().GetClient <ReleaseHttpClient2>()) .InstancePerDependency(); builder.Register(c => c.Resolve <VssConnection>().GetClient <TaskAgentHttpClient>()) .InstancePerDependency(); }
/// <summary> /// Initializes a new instance of ReleaseDefinitionActor /// </summary> /// <param name="actorService">The Microsoft.ServiceFabric.Actors.Runtime.ActorService that will host this actor instance.</param> /// <param name="actorId">The Microsoft.ServiceFabric.Actors.ActorId for this actor instance.</param> /// <param name="releaseHttpClient">release client</param> /// <param name="vstsConfiguration">vsts configuration</param> /// <param name="bigBrother">BB instance</param> /// <param name="taskAgentHttpClient">task agent client instance</param> public ReleaseDefinitionActor(ActorService actorService, ActorId actorId, ReleaseHttpClient2 releaseHttpClient, VstsConfiguration vstsConfiguration, IBigBrother bigBrother, TaskAgentHttpClient taskAgentHttpClient) : base(actorService, actorId) { _releaseHttpClient = releaseHttpClient; _vstsConfiguration = vstsConfiguration; _bigBrother = bigBrother; _taskAgentHttpClient = taskAgentHttpClient; }