diff options
Diffstat (limited to 'win/CS')
20 files changed, 176 insertions, 108 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Attributes/ShortName.cs b/win/CS/HandBrake.ApplicationServices/Attributes/ShortName.cs index eab372e34..10a4d1631 100644 --- a/win/CS/HandBrake.ApplicationServices/Attributes/ShortName.cs +++ b/win/CS/HandBrake.ApplicationServices/Attributes/ShortName.cs @@ -30,6 +30,6 @@ namespace HandBrake.ApplicationServices.Attributes /// <summary>
/// Gets or sets the short name.
/// </summary>
- public string Name { get; set; }
+ public string Name { get; private set; }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj index 89562540f..1a99efd1d 100644 --- a/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj +++ b/win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj @@ -109,7 +109,6 @@ <Compile Include="Interop\Helpers\InteropUtilities.cs" />
<Compile Include="Interop\Helpers\NativeList.cs" />
<Compile Include="Interop\Helpers\Utilities.cs" />
- <Compile Include="Interop\Helpers\Validate.cs" />
<Compile Include="Interop\Interfaces\IHandBrakeInstance.cs" />
<Compile Include="Interop\Json\Anamorphic\AnamorphicGeometry.cs" />
<Compile Include="Interop\Json\Anamorphic\DestSettings.cs" />
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeCompletedEventArgs.cs b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeCompletedEventArgs.cs index fa1ea14c3..52b5719fe 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeCompletedEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeCompletedEventArgs.cs @@ -17,8 +17,19 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs public class EncodeCompletedEventArgs : EventArgs
{
/// <summary>
- /// Gets or sets a value indicating whether an error occurred during the encode.
+ /// Initializes a new instance of the <see cref="EncodeCompletedEventArgs"/> class.
/// </summary>
- public bool Error { get; set; }
+ /// <param name="error">
+ /// The error.
+ /// </param>
+ public EncodeCompletedEventArgs(bool error)
+ {
+ this.Error = error;
+ }
+
+ /// <summary>
+ /// Gets a value indicating whether an error occurred during the encode.
+ /// </summary>
+ public bool Error { get; private set; }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs index d58798e81..5fad3248c 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/EncodeProgressEventArgs.cs @@ -17,27 +17,62 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs public class EncodeProgressEventArgs : EventArgs
{
/// <summary>
- /// Gets or sets FractionComplete.
+ /// Initializes a new instance of the <see cref="EncodeProgressEventArgs"/> class.
/// </summary>
- public double FractionComplete { get; set; }
+ /// <param name="fractionComplete">
+ /// The fraction complete.
+ /// </param>
+ /// <param name="currentFrameRate">
+ /// The current frame rate.
+ /// </param>
+ /// <param name="averageFrameRate">
+ /// The average frame rate.
+ /// </param>
+ /// <param name="estimatedTimeLeft">
+ /// The estimated time left.
+ /// </param>
+ /// <param name="passId">
+ /// The pass id.
+ /// </param>
+ /// <param name="pass">
+ /// The pass.
+ /// </param>
+ /// <param name="passCount">
+ /// The pass count.
+ /// </param>
+ public EncodeProgressEventArgs(double fractionComplete, double currentFrameRate, double averageFrameRate, TimeSpan estimatedTimeLeft, int passId, int pass, int passCount)
+ {
+ this.FractionComplete = fractionComplete;
+ this.CurrentFrameRate = currentFrameRate;
+ this.AverageFrameRate = averageFrameRate;
+ this.EstimatedTimeLeft = estimatedTimeLeft;
+ this.PassId = passId;
+ this.Pass = pass;
+ this.PassCount = passCount;
+ }
/// <summary>
- /// Gets or sets CurrentFrameRate.
+ /// Gets the % Complete.
/// </summary>
- public double CurrentFrameRate { get; set; }
+ public double FractionComplete { get; private set; }
/// <summary>
- /// Gets or sets AverageFrameRate.
+ /// Gets the Current FrameRate.
/// </summary>
- public double AverageFrameRate { get; set; }
+ public double CurrentFrameRate { get; private set; }
/// <summary>
- /// Gets or sets EstimatedTimeLeft.
+ /// Gets the Average FrameRate.
/// </summary>
- public TimeSpan EstimatedTimeLeft { get; set; }
+ public double AverageFrameRate { get; private set; }
/// <summary>
- /// Gets or sets the pass ID.
+ /// Gets the Estimated Time Left.
+ /// </summary>
+ public TimeSpan EstimatedTimeLeft { get; private set; }
+
+ /// <summary>
+ /// Gets the pass ID.
/// </summary>
/// <remarks>
/// -1: Subtitle scan
@@ -45,16 +80,16 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs /// 1: Encode first pass
/// 2: Encode second pass
/// </remarks>
- public int PassId { get; set; }
+ public int PassId { get; private set; }
/// <summary>
- /// Gets or sets the current encoding pass. (1-based)
+ /// Gets the current encoding pass. (1-based)
/// </summary>
- public int Pass { get; set; }
+ public int Pass { get; private set; }
/// <summary>
- /// Gets or sets the pass count.
+ /// Gets the pass count.
/// </summary>
- public int PassCount { get; set; }
+ public int PassCount { get; private set; }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/MessageLoggedEventArgs.cs b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/MessageLoggedEventArgs.cs index e547a2fe8..610ab0a77 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/MessageLoggedEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/MessageLoggedEventArgs.cs @@ -17,8 +17,19 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs public class MessageLoggedEventArgs : EventArgs
{
/// <summary>
- /// Gets or sets Message.
+ /// Initializes a new instance of the <see cref="MessageLoggedEventArgs"/> class.
/// </summary>
- public string Message { get; set; }
+ /// <param name="message">
+ /// The message.
+ /// </param>
+ public MessageLoggedEventArgs(string message)
+ {
+ this.Message = message;
+ }
+
+ /// <summary>
+ /// Gets the Message.
+ /// </summary>
+ public string Message { get; private set; }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/ScanProgressEventArgs.cs b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/ScanProgressEventArgs.cs index 3928a53e6..78737943e 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/ScanProgressEventArgs.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/EventArgs/ScanProgressEventArgs.cs @@ -17,28 +17,55 @@ namespace HandBrake.ApplicationServices.Interop.EventArgs public class ScanProgressEventArgs : EventArgs
{
/// <summary>
- /// Gets or sets the total progress fraction for the scan.
+ /// Initializes a new instance of the <see cref="ScanProgressEventArgs"/> class.
/// </summary>
- public double Progress { get; set; }
+ /// <param name="progress">
+ /// The progress.
+ /// </param>
+ /// <param name="currentPreview">
+ /// The current preview.
+ /// </param>
+ /// <param name="previews">
+ /// The previews.
+ /// </param>
+ /// <param name="currentTitle">
+ /// The current title.
+ /// </param>
+ /// <param name="titles">
+ /// The titles.
+ /// </param>
+ public ScanProgressEventArgs(double progress, int currentPreview, int previews, int currentTitle, int titles)
+ {
+ this.Progress = progress;
+ this.CurrentPreview = currentPreview;
+ this.Previews = previews;
+ this.CurrentTitle = currentTitle;
+ this.Titles = titles;
+ }
/// <summary>
- /// Gets or sets the current preview being processed on the scan.
+ /// Gets the total progress fraction for the scan.
/// </summary>
- public int CurrentPreview { get; set; }
+ public double Progress { get; private set; }
/// <summary>
- /// Gets or sets the total number of previews to process.
+ /// Gets the current preview being processed on the scan.
/// </summary>
- public int Previews { get; set; }
+ public int CurrentPreview { get; private set; }
/// <summary>
- /// Gets or sets the current title being processed on the scan.
+ /// Gets the total number of previews to process.
/// </summary>
- public int CurrentTitle { get; set; }
+ public int Previews { get; private set; }
/// <summary>
- /// Gets or sets the total number of titles to process.
+ /// Gets the current title being processed on the scan.
/// </summary>
- public int Titles { get; set; }
+ public int CurrentTitle { get; private set; }
+
+ /// <summary>
+ /// Gets the total number of titles to process.
+ /// </summary>
+ public int Titles { get; private set; }
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs index 62e4e1b5c..a862dc1e6 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs @@ -268,7 +268,6 @@ namespace HandBrake.ApplicationServices.Interop public BitmapImage GetPreview(PreviewSettings settings, int previewNumber)
{
SourceTitle title = this.Titles.TitleList.FirstOrDefault(t => t.Index == settings.TitleNumber);
- Validate.NotNull(title, "GetPreview: Title should not have been null. This is probably a bug.");
// Create the Expected Output Geometry details for libhb.
hb_geometry_settings_s uiGeometry = new hb_geometry_settings_s
@@ -510,14 +509,7 @@ namespace HandBrake.ApplicationServices.Interop {
if (this.ScanProgress != null)
{
- this.ScanProgress(this, new ScanProgressEventArgs
- {
- Progress = state.Scanning.Progress,
- CurrentPreview = state.Scanning.Preview,
- Previews = state.Scanning.PreviewCount,
- CurrentTitle = state.Scanning.Title,
- Titles = state.Scanning.TitleCount
- });
+ this.ScanProgress(this, new ScanProgressEventArgs(state.Scanning.Progress, state.Scanning.Preview, state.Scanning.PreviewCount, state.Scanning.Title, state.Scanning.TitleCount));
}
}
else if (state != null && state.State == NativeConstants.HB_STATE_SCANDONE)
@@ -557,16 +549,8 @@ namespace HandBrake.ApplicationServices.Interop {
if (this.EncodeProgress != null)
{
- var progressEventArgs = new EncodeProgressEventArgs
- {
- FractionComplete = state.Working.Progress,
- CurrentFrameRate = state.Working.Rate,
- AverageFrameRate = state.Working.RateAvg,
- EstimatedTimeLeft = new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds),
- PassId = state.Working.PassID,
- Pass = state.Working.Pass,
- PassCount = state.Working.PassCount
- };
+ var progressEventArgs = new EncodeProgressEventArgs(state.Working.Progress, state.Working.Rate, state.Working.RateAvg, new TimeSpan(state.Working.Hours, state.Working.Minutes, state.Working.Seconds),
+ state.Working.PassID, state.Working.Pass, state.Working.PassCount);
this.EncodeProgress(this, progressEventArgs);
}
@@ -577,10 +561,9 @@ namespace HandBrake.ApplicationServices.Interop if (this.EncodeCompleted != null)
{
- this.EncodeCompleted(this, new EncodeCompletedEventArgs
- {
- Error = state.WorkDone.Error != (int)hb_error_code.HB_ERROR_NONE
- });
+ this.EncodeCompleted(
+ this,
+ new EncodeCompletedEventArgs(state.WorkDone.Error != (int)hb_error_code.HB_ERROR_NONE));
}
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUnitConversionHelpers.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUnitConversionHelpers.cs index 758cfd302..7b981b7af 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUnitConversionHelpers.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUnitConversionHelpers.cs @@ -73,7 +73,7 @@ namespace HandBrake.ApplicationServices.Interop /// <returns>
/// The converted model.
/// </returns>
- public static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder)
+ internal static HBVideoEncoder NativeToVideoEncoder(hb_encoder_s encoder)
{
return new HBVideoEncoder
{
@@ -93,7 +93,7 @@ namespace HandBrake.ApplicationServices.Interop /// <returns>
/// The converted model.
/// </returns>
- public static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder)
+ internal static HBAudioEncoder NativeToAudioEncoder(hb_encoder_s encoder)
{
var result = new HBAudioEncoder
{
@@ -120,7 +120,7 @@ namespace HandBrake.ApplicationServices.Interop /// <returns>
/// The converted rate object.
/// </returns>
- public static HBRate NativeToRate(hb_rate_s rate)
+ internal static HBRate NativeToRate(hb_rate_s rate)
{
return new HBRate
{
@@ -138,7 +138,7 @@ namespace HandBrake.ApplicationServices.Interop /// <returns>
/// The converted model.
/// </returns>
- public static HBMixdown NativeToMixdown(hb_mixdown_s mixdown)
+ internal static HBMixdown NativeToMixdown(hb_mixdown_s mixdown)
{
return new HBMixdown
{
@@ -157,7 +157,7 @@ namespace HandBrake.ApplicationServices.Interop /// <returns>
/// The converted structure.
/// </returns>
- public static HBContainer NativeToContainer(hb_container_s container)
+ internal static HBContainer NativeToContainer(hb_container_s container)
{
return new HBContainer
{
@@ -177,7 +177,7 @@ namespace HandBrake.ApplicationServices.Interop /// <returns>
/// The converted structure.
/// </returns>
- public static Language NativeToLanguage(iso639_lang_t language)
+ internal static Language NativeToLanguage(iso639_lang_t language)
{
string englishName = InteropUtilities.ToStringFromUtf8Ptr(language.eng_name);
string nativeName = InteropUtilities.ToStringFromUtf8Ptr(language.native_name);
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs index ccbaee4c1..704e794ef 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeUtils.cs @@ -316,7 +316,7 @@ namespace HandBrake.ApplicationServices.Interop {
if (MessageLogged != null)
{
- MessageLogged(null, new MessageLoggedEventArgs { Message = message });
+ MessageLogged(null, new MessageLoggedEventArgs(message));
}
Debug.WriteLine(message);
@@ -332,7 +332,7 @@ namespace HandBrake.ApplicationServices.Interop {
if (ErrorLogged != null)
{
- ErrorLogged(null, new MessageLoggedEventArgs { Message = message });
+ ErrorLogged(null, new MessageLoggedEventArgs(message));
}
Debug.WriteLine("ERROR: " + message);
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_anamorphic_mode_t.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_anamorphic_mode_t.cs index 6940e73a8..ef0bf03f4 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_anamorphic_mode_t.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_anamorphic_mode_t.cs @@ -10,7 +10,7 @@ namespace HandBrake.ApplicationServices.Interop.HbLib
{
- public enum hb_anamorphic_mode_t
+ internal enum hb_anamorphic_mode_t
{
HB_ANAMORPHIC_NONE,
HB_ANAMORPHIC_STRICT,
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_container_s.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_container_s.cs index b9a8f3255..156bc7554 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_container_s.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_container_s.cs @@ -10,7 +10,7 @@ namespace HandBrake.ApplicationServices.Interop.HbLib using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
- public struct hb_container_s
+ internal struct hb_container_s
{
[MarshalAs(UnmanagedType.LPStr)]
public string name;
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_encoder_s.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_encoder_s.cs index 9491cb160..6fddc1827 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_encoder_s.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_encoder_s.cs @@ -10,7 +10,7 @@ namespace HandBrake.ApplicationServices.Interop.HbLib using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
- public struct hb_encoder_s
+ internal struct hb_encoder_s
{
[MarshalAs(UnmanagedType.LPStr)]
public string name;
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_mixdown_s.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_mixdown_s.cs index 768ec3189..726ebf226 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_mixdown_s.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_mixdown_s.cs @@ -10,7 +10,7 @@ namespace HandBrake.ApplicationServices.Interop.HbLib using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
- public struct hb_mixdown_s
+ internal struct hb_mixdown_s
{
[MarshalAs(UnmanagedType.LPStr)]
public string name;
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_rate_s.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_rate_s.cs index bebeccb7f..5a4f48b4a 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_rate_s.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/hb_rate_s.cs @@ -10,7 +10,7 @@ namespace HandBrake.ApplicationServices.Interop.HbLib using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
- public struct hb_rate_s
+ internal struct hb_rate_s
{
/// char*
[MarshalAs(UnmanagedType.LPStr)]
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/iso639_lang_t.cs b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/iso639_lang_t.cs index 1a4780ab2..86aa71dd8 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/HbLib/iso639_lang_t.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/HbLib/iso639_lang_t.cs @@ -11,7 +11,7 @@ namespace HandBrake.ApplicationServices.Interop.HbLib using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential)]
- public struct iso639_lang_t
+ internal struct iso639_lang_t
{
public IntPtr eng_name;
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Model/Preview/PreviewSettings.cs b/win/CS/HandBrake.ApplicationServices/Interop/Model/Preview/PreviewSettings.cs index d413e003b..b3c330a7c 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Model/Preview/PreviewSettings.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Model/Preview/PreviewSettings.cs @@ -9,7 +9,7 @@ namespace HandBrake.ApplicationServices.Interop.Model.Preview
{
- using HandBrake.ApplicationServices.Interop.Model.Encoding;
+ using Encoding;
/// <summary>
/// The preview settings.
diff --git a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj index 808b3d015..fa2b4bf5a 100644 --- a/win/CS/HandBrakeWPF/HandBrakeWPF.csproj +++ b/win/CS/HandBrakeWPF/HandBrakeWPF.csproj @@ -155,6 +155,7 @@ <Compile Include="EventArgs\SettingChangedEventArgs.cs" />
<Compile Include="Exceptions\GeneralApplicationException.cs" />
<Compile Include="Extensions\StringExtensions.cs" />
+ <Compile Include="Helpers\Validate.cs" />
<Compile Include="Model\Audio\AudioTrackDefaultsMode.cs" />
<Compile Include="Model\Audio\AudioBehaviourModes.cs" />
<Compile Include="Model\Audio\AudioBehaviours.cs" />
diff --git a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs index 12a994914..5090339b5 100644 --- a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs +++ b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs @@ -184,7 +184,7 @@ namespace HandBrakeWPF.Helpers keep = settingMode,
maxWidth = job.MaxWidth,
maxHeight = job.MaxHeight,
- mode = (int)(hb_anamorphic_mode_t)job.AnamorphicMode,
+ mode = (int)job.AnamorphicMode,
modulus = job.Modulus.HasValue ? job.Modulus.Value : 16,
geometry = new hb_geometry_s { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }}
};
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Helpers/Validate.cs b/win/CS/HandBrakeWPF/Helpers/Validate.cs index 9725710e1..7d307dfbc 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Helpers/Validate.cs +++ b/win/CS/HandBrakeWPF/Helpers/Validate.cs @@ -1,39 +1,39 @@ -// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Validate.cs" company="HandBrake Project (http://handbrake.fr)">
-// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
-// </copyright>
-// <summary>
-// The validate.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.ApplicationServices.Interop.Helpers
-{
- using System;
-
- /// <summary>
- /// The validate.
- /// </summary>
- public class Validate
- {
- /// <summary>
- /// The not null.
- /// </summary>
- /// <param name="item">
- /// The item.
- /// </param>
- /// <param name="message">
- /// The message.
- /// </param>
- /// <exception cref="ArgumentException">
- /// Thrown when the input object is null
- /// </exception>
- public static void NotNull(object item, string message)
- {
- if (item == null)
- {
- throw new ArgumentException(message);
- }
- }
- }
-}
+// -------------------------------------------------------------------------------------------------------------------- +// <copyright file="Validate.cs" company="HandBrake Project (http://handbrake.fr)"> +// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License. +// </copyright> +// <summary> +// The validate. +// </summary> +// -------------------------------------------------------------------------------------------------------------------- + +namespace HandBrakeWPF.Helpers +{ + using System; + + /// <summary> + /// The validate. + /// </summary> + public class Validate + { + /// <summary> + /// The not null. + /// </summary> + /// <param name="item"> + /// The item. + /// </param> + /// <param name="message"> + /// The message. + /// </param> + /// <exception cref="ArgumentException"> + /// Thrown when the input object is null + /// </exception> + public static void NotNull(object item, string message) + { + if (item == null) + { + throw new ArgumentException(message); + } + } + } +} diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs index bf456c859..10037fc55 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs @@ -36,6 +36,7 @@ namespace HandBrakeWPF.Services.Encode.Factories using PointToPointMode = HandBrakeWPF.Services.Encode.Model.Models.PointToPointMode; using Subtitle = HandBrake.ApplicationServices.Interop.Json.Encode.Subtitles; using SubtitleTrack = HandBrakeWPF.Services.Encode.Model.Models.SubtitleTrack; + using Validate = HandBrakeWPF.Helpers.Validate; /// <summary> /// This factory takes the internal EncodeJob object and turns it into a set of JSON models |