Skip to content

Commit

Permalink
rename AdditonalFile -> FileMask
Browse files Browse the repository at this point in the history
  • Loading branch information
soygul committed Nov 6, 2015
1 parent e81fd38 commit 0bf7607
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ UpgradeLog*.XML

# NuGet
packages/

# MonoDevelop
NBug.userprefs
2 changes: 1 addition & 1 deletion NBug/Core/Reporting/BugReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ internal ExecutionFlow Report(Exception exception, ExceptionThread exceptionThre
// ToDo: PRIORITY TASK! This code needs more testing & condensation
private void AddAdditionalFiles(ZipStorer zipStorer)
{
foreach (AdditionalFile additionalFiles in Settings.AdditionalReportFiles)
foreach (FileMask additionalFiles in Settings.AdditionalReportFiles)
{
additionalFiles.AddToZip(zipStorer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace NBug.Core.Util.Storage
{
public class AdditionalFile
public class FileMask
{
/// <summary>
/// Gets or sets a the file path. The files can use * or ? in the same way as DOS modifiers.
Expand All @@ -20,20 +20,20 @@ public class AdditionalFile
/// </summary>
public FileShare FileShare { get; set; }

public AdditionalFile(String path)
public FileMask(String path)
{
this.FilePath = path;
FileShare = FileShare.Read;
}

public static implicit operator String(AdditionalFile o)
public static implicit operator String(FileMask o)
{
return o == null ? null : o.FilePath;
}

public static implicit operator AdditionalFile(String o)
public static implicit operator FileMask(String o)
{
return o == null ? null : new AdditionalFile(o);
return o == null ? null : new FileMask(o);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion NBug/NBug.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
<Compile Include="Core\UI\WinForms\Panels\ExceptionDetails.Designer.cs">
<DependentUpon>ExceptionDetails.cs</DependentUpon>
</Compile>
<Compile Include="Core\Util\Storage\AdditionalFile.cs" />
<Compile Include="Core\Util\Storage\FileMask.cs" />
<Compile Include="Core\Util\Web\StreamUpload.cs" />
<Compile Include="Core\Util\ConnectionStringParser.cs" />
<Compile Include="Core\Util\PublicResources.cs" />
Expand Down
4 changes: 2 additions & 2 deletions NBug/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static Settings()

// GetEntryAssembly() is null if there is no initial GUI/CLI
NBugDirectory = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location) ?? Environment.CurrentDirectory;
AdditionalReportFiles = new List<AdditionalFile>();
AdditionalReportFiles = new List<FileMask>();

// Default to developer mode settings. Settings this now so that any exception below will be handled with correct settings
ReleaseMode = false; // ToDo: This results initial config loading always setup to ThrowExceptions = true;
Expand Down Expand Up @@ -212,7 +212,7 @@ public static event Action<Exception, Report> ProcessingException
/// <summary>
/// Gets or sets a list of additional files to be added to the report zip. The files can use * or ? in the same way as DOS modifiers.
/// </summary>
public static List<AdditionalFile> AdditionalReportFiles { get; set; }
public static List<FileMask> AdditionalReportFiles { get; set; }

public static ICollection<IProtocol> Destinations
{
Expand Down

0 comments on commit 0bf7607

Please sign in to comment.