public string vcproj_name; /* Project file, NULL for standard */ #endregion Fields #region Constructors public Library() { has_platform_ext = false; is_executable = false; release_mode = ReleaseMode.ReleaseMode_Release; build_mode = BuildMode.BuildMode_Simple; }
/// <summary> /// Simply read whatever persisted from previous sessions here. /// </summary> public void DeserializeSettings(Stream input) { using (BinaryReader reader = new BinaryReader(input)) { try { m_Destination = reader.ReadString(); m_FileTypeId = new Guid(reader.ReadString()); m_WorkingMode = (ReleaseMode)Enum.Parse(typeof(ReleaseMode), reader.ReadString()); m_IndexFileName = reader.ReadString(); //TODO: this works when the number is under 127. Need to handle large integers m_MaxImageFiles = reader.ReadInt32(); } catch { /// If the script throws exceptions here, it wouldn't be able to recover from the application. /// This will be addressed in a later version of the API. m_Destination = string.Empty; m_FileTypeId = Guid.Empty; m_WorkingMode = ReleaseMode.SinglePage; m_IndexFileName = string.Empty; m_MaxImageFiles = 0; } } }
/// <summary> /// Simply read whatever persisted from previous sessions here. /// </summary> public void DeserializeSettings(Stream input) { using (BinaryReader reader = new BinaryReader(input)) { try { m_Destination = reader.ReadString(); m_FileTypeId = new Guid(reader.ReadString()); m_WorkingMode = (ReleaseMode)Enum.Parse(typeof(ReleaseMode), reader.ReadString()); m_IndexField = reader.ReadString(); m_Padding = reader.ReadInt32(); m_DeleteFirstPage = reader.ReadBoolean(); } catch { /// If the script throws exceptions here, it wouldn't be able to recover from the application. /// This will be addressed in a later version of the API. m_Destination = string.Empty; m_FileTypeId = Guid.Empty; m_WorkingMode = ReleaseMode.SinglePage; m_IndexField = string.Empty; m_Padding = 0; m_DeleteFirstPage = false; } } }
public string vcproj_name; /* Project file, NULL for standard */ #endregion Fields #region Constructors public Library() { has_platform_ext = false; is_executable = false; release_mode = ReleaseMode.ReleaseMode_Release; build_mode = BuildMode.BuildMode_Simple; platform = BasePlatform.Platform_Linux | BasePlatform.Platform_Windows; }
public AssetBundleInfo(ReleaseMode _releaseMode = ReleaseMode.None, string _AssetBundleName = null, string[] _DependenciesBundleNames = null, string _HashString = null, bool _BaseBundle = true, int size = 0) { releaseMode = _releaseMode; AssetBundleName = _AssetBundleName; DependenciesBundleNames = _DependenciesBundleNames; HashString = _HashString; BaseBundle = _BaseBundle; Size = size; }
public static void RegisterVersion(Version version, DateTime releaseDate, ReleaseMode mode) { var newv = new VersionMetaData() { Version = version, ReleaseDate = releaseDate, Mode = mode }; if (_versionData.ContainsKey(version)) { throw new ArgumentException("Can't register version " + version + " it is already registered.", "version"); } if (mode == ReleaseMode.Test && _versionData.Any(x => x.Value.Mode == ReleaseMode.Test)) { throw new ArgumentException("Can't have multiple versions in Test at once", "mode"); } _versionData.Add(version, newv); // Process versions // Reorder _versionData = _versionData.OrderByDescending(x => x.Key).ToDictionary(x => x.Key, x => x.Value); // Set all proper delete times VersionMetaData latestLive = null; VersionMetaData prevLive = null; foreach (var v in _versionData) { if (latestLive == null && v.Value.Mode == ReleaseMode.Live) { v.Value.DeleteDate = DateTime.MaxValue; prevLive = v.Value; latestLive = v.Value; continue; } // the version directly below the most recent version should not expire (we will always allow at least 2 API versions at any given time) if (prevLive.Version == version) { v.Value.DeleteDate = DateTime.MaxValue; prevLive = v.Value; continue; } if (v.Value.Mode == ReleaseMode.Test) { v.Value.DeleteDate = DateTime.MaxValue; continue; } // It should actually use the release b4 it v.Value.DeleteDate = prevLive.ReleaseDate.AddMonths(6); prevLive = v.Value; } }
public ColormaxCustomExport( IEnumerable <IExporter> exporters, string destination, Guid fileTypeId, ReleaseMode workingMode, IIndexField[] indexFields, string indexField, int padding, bool deleteFirstPage) { InitializeComponent(); this.Text = "Colormax Custom Exporter Setup - " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; /// Reflecting current settings onto UI controls input_Destination.Text = destination; m_CurrentFileTypeId = fileTypeId; /// An exporter can support both interfaces foreach (IExporter exporter in exporters) { if (exporter is IPageOutputConverter) { m_PageConverters.Add(exporter as IPageOutputConverter); } if (exporter is IDocumentOutputConverter) { m_DocConverters.Add(exporter as IDocumentOutputConverter); } } option_Single.Checked = workingMode == ReleaseMode.SinglePage; //option_Multi.Checked = workingMode == ReleaseMode.MultiPage; //set single page option option_Single.Checked = true; cbIndexValue.Items.Clear(); foreach (IIndexField field in indexFields) { cbIndexValue.Items.Add(field.Label); } for (int count = 0; count < indexFields.Length; count++) { if (indexField.Equals(cbIndexValue.Items[count])) { cbIndexValue.SelectedIndex = count; } } txtPadding.Text = padding.ToString(); cbDeleteFirstPage.Checked = deleteFirstPage; }
/// <summary> /// Whenever the user request to configure the script's settings, the method will be called with /// latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass them further down to the exporters. /// </summary> public void Setup(IList <IExporter> exporters, IIndexField[] indexFields, IDictionary <string, string> releaseData) { SimpleReleaseSetup setupDialog = new SimpleReleaseSetup(exporters, m_Destination, m_FileTypeId, m_WorkingMode); if (setupDialog.ShowDialog() != DialogResult.OK) { return; } m_Destination = setupDialog.Destination; m_FileTypeId = setupDialog.FileTypeId; m_WorkingMode = setupDialog.WorkingMode; }
public IMovementStyle ReleaseCurrentState(ReleaseMode mode, float precedence = 0f) { switch(mode) { case ReleaseMode.Pop: if (_styleStack.Count > 0) return this.PopState(precedence); else return _current; case ReleaseMode.PopAll: if (_styleStack.Count > 0) return this.PopAllStates(precedence); else return _current; case ReleaseMode.Default: return this.ChangeState(_owner._defaultMovementStyle as IMovementStyle, precedence); case ReleaseMode.Null: this.ChangeStateToNull(precedence); return null; case ReleaseMode.PopOrDefault: if (_styleStack.Count > 0) return this.PopState(precedence); else return this.ChangeState(_owner._defaultMovementStyle as IMovementStyle, precedence); case ReleaseMode.PopAllOrDefault: if (_styleStack.Count > 0) return this.PopAllStates(precedence); else return this.ChangeState(_owner._defaultMovementStyle as IMovementStyle, precedence); case ReleaseMode.PopOrNull: if (_styleStack.Count > 0) return this.PopState(precedence); else { this.ChangeStateToNull(precedence); return null; } case ReleaseMode.PopAllOrNull: if (_styleStack.Count > 0) return this.PopAllStates(precedence); else { this.ChangeStateToNull(precedence); return null; } } throw new System.ArgumentException("ReleaseMode was of an indeterminate configuration."); }
public static void RegisterVersion(Version version, DateTime releaseDate, ReleaseMode mode) { var newv = new VersionMetaData() { Version = version, ReleaseDate = releaseDate, Mode = mode }; if (_versionData.ContainsKey(version)) { throw new ArgumentException("Can't register version " + version + " it is already registered.", "version"); } if (mode == ReleaseMode.Test && _versionData.Any(x => x.Value.Mode == ReleaseMode.Test)) { throw new ArgumentException("Can't have multiple versions in Test at once", "mode"); } _versionData.Add(version, newv); // Process versions // Reorder _versionData = _versionData.OrderByDescending(x => x.Key).ToDictionary(x => x.Key, x => x.Value); // Set all proper delete times var foundLive = false; var i = 0; foreach (var v in _versionData) { if (foundLive == false && i != 2 && v.Value.Mode == ReleaseMode.Live) { v.Value.DeleteDate = DateTime.MaxValue; foundLive = true; i++; continue; } if (v.Value.Mode == ReleaseMode.Test) { v.Value.DeleteDate = DateTime.MaxValue; i++; continue; } v.Value.DeleteDate = v.Value.ReleaseDate.AddMonths(6); i++; } }
/// <summary> /// Whenever the user requests to configure the script's settings, the method will be called with /// the latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass it further down to the exporters. /// </summary> public void Setup(IList <IExporter> exporters, IIndexField[] indexFields, IDictionary <string, string> releaseData) { ColormaxCustomExport dialog = new ColormaxCustomExport(exporters, m_Destination, m_FileTypeId, m_WorkingMode, indexFields, m_IndexField, m_Padding, m_DeleteFirstPage); if (dialog.ShowDialog() != DialogResult.OK) { return; } m_Destination = dialog.Destination; m_FileTypeId = dialog.FileTypeId; m_WorkingMode = dialog.WorkingMode; m_IndexField = dialog.IndexField; m_Padding = dialog.PaddingValue; m_DeleteFirstPage = dialog.DeleteFirstPage; }
public ColormaxCustomExport( IEnumerable<IExporter> exporters, string destination, Guid fileTypeId, ReleaseMode workingMode, IIndexField[] indexFields, string indexField, int padding, bool deleteFirstPage) { InitializeComponent(); this.Text = "Colormax Custom Exporter Setup - " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; /// Reflecting current settings onto UI controls input_Destination.Text = destination; m_CurrentFileTypeId = fileTypeId; /// An exporter can support both interfaces foreach (IExporter exporter in exporters) { if (exporter is IPageOutputConverter) m_PageConverters.Add(exporter as IPageOutputConverter); if (exporter is IDocumentOutputConverter) m_DocConverters.Add(exporter as IDocumentOutputConverter); } option_Single.Checked = workingMode == ReleaseMode.SinglePage; //option_Multi.Checked = workingMode == ReleaseMode.MultiPage; //set single page option option_Single.Checked = true; cbIndexValue.Items.Clear(); foreach (IIndexField field in indexFields) cbIndexValue.Items.Add(field.Label); for (int count = 0; count < indexFields.Length; count++ ) { if (indexField.Equals(cbIndexValue.Items[count])) cbIndexValue.SelectedIndex = count; } txtPadding.Text = padding.ToString(); cbDeleteFirstPage.Checked = deleteFirstPage; }
/// <summary> /// Whenever the user requests to configure the script's settings, the method will be called with /// the latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass it further down to the exporters. /// </summary> public void Setup(IList <IExporter> exporters, IIndexField[] indexFields, IDictionary <string, string> releaseData) { AxReleaseSetup setupDialog = new AxReleaseSetup(exporters, m_Destination, m_FileTypeId, m_WorkingMode, m_IndexFileName, m_MaxImageFiles); if (setupDialog.ShowDialog() != DialogResult.OK) { return; } m_Destination = setupDialog.Destination; m_FileTypeId = setupDialog.FileTypeId; m_WorkingMode = setupDialog.WorkingMode; m_IndexFileName = setupDialog.IndexFileName; m_MaxImageFiles = Int32.Parse(setupDialog.MaxImageFiles); }
public IcmCustomExporterSetup( IEnumerable<IExporter> exporters, string destination, Guid fileTypeId, ReleaseMode workingMode, Boolean deleteFirstPage) { InitializeComponent(); this.Text = "ICM Custom Exporter Setup - " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; /// Reflecting current settings onto UI controls input_Destination.Text = destination; m_CurrentFileTypeId = fileTypeId; DeleteFirstPage = deleteFirstPage; /// An exporter can support both interfaces foreach (IExporter exporter in exporters) { if (exporter is IPageOutputConverter) m_PageConverters.Add(exporter as IPageOutputConverter); if (exporter is IDocumentOutputConverter) m_DocConverters.Add(exporter as IDocumentOutputConverter); } //option_Single.Checked = workingMode == ReleaseMode.SinglePage; //option_Multi.Checked = workingMode == ReleaseMode.MultiPage; option_Single.Enabled = true; option_Single.Checked = true; //option_Multi.Select(); //combo_FileType.SelectedIndex = 2; combo_FileType.Enabled = true; if (deleteFirstPage) { delete_first_page_checkbox.Checked = true; } else if (!deleteFirstPage) { delete_first_page_checkbox.Checked = false; } }
public MuTestOptions Build() { var muTestOptions = new MuTestOptions { SourceProjectParameter = GetOption(SourceProject.Value(), CliOptions.SourceProject), SourceProjectLibraryParameter = GetOption(SourceLib.Value(), CliOptions.SourceLib), SourceClassParameter = GetOption(SourceClass.Value(), CliOptions.SourceClass), TestProjectParameter = GetOption(TestProject.Value(), CliOptions.TestProject), TestProjectLibraryParameter = GetOption(TestLib.Value(), CliOptions.TestLib), TestClassParameter = GetOption(TestClass.Value(), CliOptions.TestClass), ExecuteAllTests = GetOption(ExecuteAllTests.Value(), CliOptions.ExecuteAllTests), SkipTestProjectBuild = GetOption(SkipTestProjectBuild.Value(), CliOptions.SkipTestProjectBuild), IncludePartialClasses = GetOption(IncludePartialClasses.Value(), CliOptions.IncludePartialClasses), AnalyzeExternalCoveredClasses = GetOption(AnalyzeExternalCoveredClasses.Value(), CliOptions.AnalyzeExternalCoveredClasses), IncludeNestedClasses = GetOption(IncludeNestedClasses.Value(), CliOptions.IncludeNestedClasses), UseClassFilter = GetOption(UseClassFilter.Value(), CliOptions.UseClassFilter), X64TargetPlatform = GetOption(X64.Value(), CliOptions.X64TargetPlatform), BuildInReleaseModeParameter = GetOption(ReleaseMode.Value(), CliOptions.BuildInReleaseMode), EnableDiagnostics = GetOption(Diagnostics.Value(), CliOptions.EnableDiagnostics), OptimizeTestProject = GetOption(OptimizeTestProject.Value(), CliOptions.OptimizeTestProject), ConcurrentTestRunners = GetOption(Parallel.Value(), CliOptions.Parallel), SurvivedThreshold = GetOption(SurvivedThreshold.Value(), CliOptions.SurvivedThreshold), KilledThreshold = GetOption(KilledThreshold.Value(), CliOptions.KilledThreshold), OutputPathParameter = GetOption(OutputPath.Value(), CliOptions.OutputPath), NoCoverage = GetOption(NoCoverage.Value(), CliOptions.NoCoverage), RegEx = GetOption(RegEx.Value(), CliOptions.Regex), Specific = GetOption(Specific.Value(), CliOptions.Specific), ClassName = GetOption(ClassName.Value(), CliOptions.ClassName), ProcessWholeProject = GetOption(ProcessWholeProject.Value(), CliOptions.ProcessWholeProject), TestExecutionThreshold = GetOption(FindTestTime.Value(), CliOptions.TestExecutionThreshold), MutantsPerLine = GetOption(MutantsPerLine.Value(), CliOptions.MutantsPerLine) }; muTestOptions .MultipleSourceClasses .AddRange(GetOption(MultipleSourceClasses.Value(), CliOptions.MultipleSourceClasses).Distinct()); muTestOptions .MultipleTestClasses .AddRange(GetOption(MultipleTestClasses.Value(), CliOptions.MultipleTestClasses).Distinct()); muTestOptions.ValidateOptions(); return(muTestOptions); }
public AxReleaseSetup( IEnumerable <IExporter> exporters, string destination, Guid fileTypeId, ReleaseMode workingMode, String index, Int32 maxFiles) { InitializeComponent(); /// Reflecting current settings onto UI controls input_Destination.Text = destination; m_CurrentFileTypeId = fileTypeId; textbox_IndexFileName.Text = index; textbox_MaxImages.Text = maxFiles.ToString(); /// An exporter can support both interfaces foreach (IExporter exporter in exporters) { if (exporter is IPageOutputConverter) { m_PageConverters.Add(exporter as IPageOutputConverter); } if (exporter is IDocumentOutputConverter) { m_DocConverters.Add(exporter as IDocumentOutputConverter); } } option_Single.Checked = workingMode == ReleaseMode.SinglePage; option_Multi.Checked = workingMode == ReleaseMode.MultiPage; //Removed ability to customize the amount of files per directory label_ImageCount.Hide(); textbox_MaxImages.Hide(); }
/// <summary> /// Simply read whatever persisted from previous sessions here.. /// </summary> public void DeserializeSettings(Stream input) { using (BinaryReader reader = new BinaryReader(input)) { try { m_Destination = reader.ReadString(); m_FileTypeId = new Guid(reader.ReadString()); m_WorkingMode = (ReleaseMode)Enum.Parse(typeof(ReleaseMode), reader.ReadString()); } catch { /// If the script throw exceptions here, it wouldn't be able to recover from the application /// This will be addressed in later version of the API.. m_Destination = string.Empty; m_FileTypeId = Guid.Empty; m_WorkingMode = ReleaseMode.SinglePage; } } }
/// <summary> /// Whenever the user request to configure the script's settings, the method will be called with /// latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass them further down to the exporters. /// </summary> public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { SimpleReleaseSetup setupDialog = new SimpleReleaseSetup(exporters, m_Destination, m_FileTypeId, m_WorkingMode); if (setupDialog.ShowDialog() != DialogResult.OK) return; m_Destination = setupDialog.Destination; m_FileTypeId = setupDialog.FileTypeId; m_WorkingMode = setupDialog.WorkingMode; }
internal void ReleaseInternal(ReleaseMode mode = ReleaseMode.Normal) { if (_released) { // Prevent infinite loops with circular dependencies return; } // A disabled shell still in use will be released by its last scope, as checked at the host level. if (mode == ReleaseMode.FromDependency && Settings.State == TenantState.Disabled && _refCount != 0) { return; } // When a tenant is changed and should be restarted, its shell context is replaced with a new one, // so that new request can't use it anymore. However some existing request might still be running and try to // resolve or use its services. We then call this method to count the remaining references and dispose it // when the number reached zero. ShellScope scope = null; lock (_synLock) { if (_released) { return; } if (_dependents != null) { foreach (var dependent in _dependents) { if (dependent.TryGetTarget(out var shellContext)) { shellContext.ReleaseFromDependency(); } } } if (mode != ReleaseMode.FromLastScope && ServiceProvider != null) { // Before marking the shell as released, we create a new scope that will manage the shell state, // so that we always use the same shell scope logic to check if the reference counter reached 0. scope = new ShellScope(this); } _released = true; } if (mode == ReleaseMode.FromLastScope) { return; } if (scope != null) { // Use this scope to manage the shell state as usual. scope.TerminateShellAsync().GetAwaiter().GetResult(); return; } Dispose(); }
/// <summary> /// Whenever the user requests to configure the script's settings, the method will be called with /// the latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass it further down to the exporters. /// </summary> public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { ColormaxCustomExport dialog = new ColormaxCustomExport(exporters, m_Destination, m_FileTypeId, m_WorkingMode, indexFields, m_IndexField, m_Padding, m_DeleteFirstPage); if (dialog.ShowDialog() != DialogResult.OK) return; m_Destination = dialog.Destination; m_FileTypeId = dialog.FileTypeId; m_WorkingMode = dialog.WorkingMode; m_IndexField = dialog.IndexField; m_Padding = dialog.PaddingValue; m_DeleteFirstPage = dialog.DeleteFirstPage; }
/// <summary> /// Initializes a new instance of the <see cref="AssemblyStatusAttribute" /> class. /// </summary> /// <param name="releaseMode">The release mode.</param> public AssemblyStatusAttribute(ReleaseMode releaseMode) { _releaseMode = releaseMode; }
/// <summary> /// This simple script will process batches in both single-page and multi-page release modes. /// </summary> public bool IsSupported(ReleaseMode mode) { return(true); }
public bool IsSupported(ReleaseMode mode) { return mode == ReleaseMode.SinglePage; }
public bool IsSupported(ReleaseMode mode) { return(mode == ReleaseMode.SinglePage); }
bool IDocumentIndexGenerator.IsSupported(ReleaseMode mode) { return mode == ReleaseMode.MultiPage; }
/// <summary> /// This simple script will process batches in both single-page and multi-page release modes. /// </summary> public bool IsSupported(ReleaseMode mode) { return true; }
public bool IsSupported(ReleaseMode mode) { if (mode == ReleaseMode.MultiPage) return true; throw new Exception("Unsupported export mode."); }
/// <summary> /// Whenever the user requests to configure the script's settings, the method will be called with /// the latest information from the application's running instance as parameters. Also, a script can /// define and add its own information to the data table and pass it further down to the exporters. /// </summary> public void Setup(IList<IExporter> exporters, IIndexField[] indexFields, IDictionary<string, string> releaseData) { AxReleaseSetup setupDialog = new AxReleaseSetup(exporters, m_Destination, m_FileTypeId, m_WorkingMode, m_IndexFileName, m_MaxImageFiles); if (setupDialog.ShowDialog() != DialogResult.OK) return; m_Destination = setupDialog.Destination; m_FileTypeId = setupDialog.FileTypeId; m_WorkingMode = setupDialog.WorkingMode; m_IndexFileName = setupDialog.IndexFileName; m_MaxImageFiles = Int32.Parse(setupDialog.MaxImageFiles); }
public BundleInfo(string path, bool baseBundle, ReleaseMode releaseMode) { this.releaseMode = releaseMode; Path = path; BaseBundle = baseBundle; }
/// <summary> /// Initializes a new instance of the <see cref="AssemblyStatusAttribute" /> class. /// </summary> /// <param name="releaseMode">The release mode.</param> public AssemblyStatusAttribute(ReleaseMode releaseMode) { this._releaseMode = releaseMode; }
public MultiBundleInfo(string path, bool baseBundle, ReleaseMode releaseMode) : base(path, baseBundle, releaseMode) { }