public Project(IProjectState state, IProjectStateRepository repo) : this(state) { _repo = repo; }
public static IEntityValue CreateLaunchProfileValue(IQueryExecutionContext queryExecutionContext, EntityIdentity id, QueryProjectPropertiesContext propertiesContext, Rule rule, int order, IProjectState cache, ILaunchProfilePropertiesAvailableStatus properties) { LaunchProfileValue newLaunchProfile = new(queryExecutionContext.EntityRuntime, id, new LaunchProfilePropertiesAvailableStatus()); if (properties.Name) { newLaunchProfile.Name = propertiesContext.ItemName; } if (properties.CommandName) { if (rule.Metadata.TryGetValue("CommandName", out object?commandNameObj) && commandNameObj is string commandName) { newLaunchProfile.CommandName = commandName; } } if (properties.Order) { newLaunchProfile.Order = order; } ((IEntityValueFromProvider)newLaunchProfile).ProviderState = new ContextAndRuleProviderState(cache, propertiesContext, rule); return(newLaunchProfile); }
public Project(IProjectState state) { _state = state; }
public static IEntityValue CreateUIPropertyValue(IQueryExecutionContext queryExecutionContext, IEntityValue parent, IProjectState cache, QueryProjectPropertiesContext propertiesContext, BaseProperty property, int order, IUIPropertyPropertiesAvailableStatus requestedProperties) { Requires.NotNull(parent, nameof(parent)); Requires.NotNull(property, nameof(property)); var identity = new EntityIdentity( ((IEntityWithId)parent).Id, new KeyValuePair <string, string>[] { new(ProjectModelIdentityKeys.UIPropertyName, property.Name) });
private IEntityValue CreateLaunchProfileValue(IQueryExecutionContext queryExecutionContext, IEntityValue parent, QueryProjectPropertiesContext propertiesContext, Rule rule, int order, IProjectState projectState) { EntityIdentity identity = new( ((IEntityWithId)parent).Id, new Dictionary <string, string> { { ProjectModelIdentityKeys.SourceItemType, propertiesContext.ItemType ! },
public ComponentState(NewBuild newBuild, IBranchState branchState, IProjectState projectState) { _newBuild = newBuild; _branchState = branchState; _projectState = projectState; }
public static IEntityValue CreatePropertyPageValue(IQueryExecutionContext queryExecutionContext, EntityIdentity id, IProjectState cache, QueryProjectPropertiesContext propertiesContext, Rule rule, IPropertyPagePropertiesAvailableStatus requestedProperties) { Requires.NotNull(rule, nameof(rule)); var newPropertyPage = new PropertyPageValue(queryExecutionContext.EntityRuntime, id, new PropertyPagePropertiesAvailableStatus()); if (requestedProperties.Name) { newPropertyPage.Name = rule.Name; } if (requestedProperties.DisplayName) { newPropertyPage.DisplayName = rule.DisplayName; } if (requestedProperties.Order) { newPropertyPage.Order = rule.Order; } if (requestedProperties.Kind) { newPropertyPage.Kind = rule.PageTemplate; } ((IEntityValueFromProvider)newPropertyPage).ProviderState = new ContextAndRuleProviderState(cache, propertiesContext, rule); return(newPropertyPage); }
public static IEntityValue CreatePropertyPageValue(IQueryExecutionContext queryExecutionContext, IEntityValue parent, IProjectState cache, QueryProjectPropertiesContext propertiesContext, Rule rule, IPropertyPagePropertiesAvailableStatus requestedProperties) { Requires.NotNull(parent, nameof(parent)); Requires.NotNull(rule, nameof(rule)); var identity = new EntityIdentity( ((IEntityWithId)parent).Id, createKeys()); return(CreatePropertyPageValue(queryExecutionContext, identity, cache, propertiesContext, rule, requestedProperties)); IEnumerable <KeyValuePair <string, string> > createKeys() { yield return(new(ProjectModelIdentityKeys.PropertyPageName, rule.Name)); if (propertiesContext.ItemType is not null) { yield return(new(ProjectModelIdentityKeys.SourceItemType, propertiesContext.ItemType)); } if (propertiesContext.ItemName is not null) { yield return(new(ProjectModelIdentityKeys.SourceItemName, propertiesContext.ItemName)); } } }
public ProjectDto(IProjectState state) { _state = state; _projectRoleStates = _state.ProjectRoleStates.Select(s => new ProjectRoleDto(s)).ToList(); }
public NugetPackageState(NewBuild newBuild, IBranchState branchState, IProjectState projectState) { _newBuild = newBuild; _branchState = branchState; _projectState = projectState; }