// TODO NameUpdate: What about the custom ordering operators for AsmVersions?
        public int CompareTo(IAssemblyVersion other)
        {
            var otherVersion = other as AssemblyVersion;

            if (otherVersion == null)
            {
                return(int.MinValue);
            }
            var majorDiff = Major - otherVersion.Major;

            if (majorDiff != 0)
            {
                return(majorDiff);
            }
            var minorDiff = Minor - otherVersion.Minor;

            if (minorDiff != 0)
            {
                return(minorDiff);
            }
            var buildDiff = Build - otherVersion.Build;

            if (buildDiff != 0)
            {
                return(buildDiff);
            }
            return(Revision - otherVersion.Revision);
        }
        public int CompareTo(IAssemblyVersion other)
        {
            var otherVersion = other as v0.Types.Organization.AssemblyVersion;

            if (otherVersion == null || other.IsUnknown || IsUnknown)
            {
                return(int.MinValue);
            }
            var majorDiff = Major - otherVersion.Major;

            if (majorDiff != 0)
            {
                return(majorDiff);
            }
            var minorDiff = Minor - otherVersion.Minor;

            if (minorDiff != 0)
            {
                return(minorDiff);
            }
            var buildDiff = Build - otherVersion.Build;

            if (buildDiff != 0)
            {
                return(buildDiff);
            }
            return(Revision - otherVersion.Revision);
        }
示例#3
0
 /// <summary>
 /// Instantiated via injection
 /// </summary>
 /// <param name="accessor">(injected)</param>
 /// <param name="storage">(injected)</param>
 /// <param name="assemblyVersion">(injected)</param>
 public ApiController(IHttpContextAccessor accessor, IStorage storage, IAssemblyVersion assemblyVersion)
 {
     _Accessor        = accessor;
     _Storage         = storage;
     _AssemblyVersion = assemblyVersion;
 }
示例#4
0
 public void ExtractFiles(IAssemblyVersion version, string targetDirectory)
 {
     ExtractFiles(platform: version.Platform?.ToLower(), version: version.AssembleVersion, targetDirectory: targetDirectory);
 }
 public AssemblyVersionFilterAttribute(IAssemblyVersion assemblyVersionService)
 {
     _assemblyVersion = assemblyVersionService;
 }
 public AssemblyVersionFilterAttribute()
 {
     _assemblyVersion = CreateDependency <IAssemblyVersion>();
 }
 public AssemblyVersionFilterAttribute(IAssemblyVersion assemblyVersionService)
 {
     _assemblyVersion = assemblyVersionService;
 }
 public AssemblyVersionFilterAttribute()
 {
     _assemblyVersion = CreateDependency <IAssemblyVersion>();
 }
示例#9
0
 public int CompareTo(IAssemblyVersion other)
 {
     return(-1);
 }
 public HtmlToPdfConverter(IAssemblyVersion wkHtmlToPdfVerstion = null)
 {
     _wkHtmlToPdfVersion = wkHtmlToPdfVerstion ?? _defaultAssemblyVersion;
 }
        private IAssemblyVersion _defaultAssemblyVersion = WKHtmlToPDFVersions.WIN64_0_12_6_mxecross; //.Win32_0_12_4_0;

        public HtmlToPdfConverter()
        {
            _wkHtmlToPdfVersion = _defaultAssemblyVersion;
        }
示例#12
0
 /// <summary>
 /// Instantiated via injection
 /// </summary>
 /// <param name="assemblyVersion">(injected)</param>
 /// <param name="storage">(injected)</param>
 public HomeController(IAssemblyVersion assemblyVersion, IStorage storage)
 {
     _AssemblyVersion = assemblyVersion;
     _Storage         = storage;
 }