public ApplicationId(byte[] publicKeyToken, string name, System.Version version, string processorArchitecture, string culture) { if (name == null) { throw new ArgumentNullException("name"); } if (name.Length == 0) { throw new ArgumentException(Environment.GetResourceString("Argument_EmptyApplicationName")); } if (version == null) { throw new ArgumentNullException("version"); } if (publicKeyToken == null) { throw new ArgumentNullException("publicKeyToken"); } this.m_publicKeyToken = new byte[publicKeyToken.Length]; Array.Copy(publicKeyToken, 0, this.m_publicKeyToken, 0, publicKeyToken.Length); this.m_name = name; this.m_version = version; this.m_processorArchitecture = processorArchitecture; this.m_culture = culture; }
public void GetClrVersionTest() { string targetFrameworkVersion = "v3.5"; string expected = "2.0.50727.0"; string actual; actual = Util_Accessor.GetClrVersion(targetFrameworkVersion); Assert.AreEqual(expected, actual); targetFrameworkVersion = "3.5"; actual = Util_Accessor.GetClrVersion(targetFrameworkVersion); Assert.AreEqual(expected, actual); System.Version currentVersion = System.Environment.Version; System.Version clr4Version = new System.Version(currentVersion.Major, currentVersion.Minor, currentVersion.Build, 0); targetFrameworkVersion = "v4.0"; actual = Util_Accessor.GetClrVersion(targetFrameworkVersion); expected = clr4Version.ToString(); Assert.AreEqual(expected, actual); targetFrameworkVersion = "v4.2"; actual = Util_Accessor.GetClrVersion(targetFrameworkVersion); expected = clr4Version.ToString(); Assert.AreEqual(expected, actual); }
public FileInfoEx(string fileName, int rootDirLength) { myFileInfo = new FileInfo(fileName); var verInfo = FileVersionInfo.GetVersionInfo(fileName); if (myFileVersion != null) myFileVersion = new System.Version(verInfo.FileMajorPart, verInfo.FileMinorPart, verInfo.FileBuildPart, verInfo.FilePrivatePart).ToString(); myHash = AppUpdate.Utils.FileChecksum.GetSHA256Checksum(fileName); RelativeName = fileName.Substring(rootDirLength + 1); }
public void Can_Get_Ordered_Migrations_For_1_12_0() { var oneEleven = new Version(1, 11, 0); var oneTwelve = new Version(1, 12, 0); //var ordered = _resolver.OrderedUpgradeMigrations(oneEleven, oneTwelve); //foreach (var m in ordered) //{ // Assert.AreEqual(oneTwelve, m.GetType().GetCustomAttribute<MigrationAttribute>(false).TargetVersion); //} }
public void Can_Determine_The_MerchelloDatabaseVersion() { //// Arrange var expected = new Version(1, 7, 0); //// Act var result = _databaseSchemaCreation.ValidateSchema(); Assert.NotNull(result); var version = result.DetermineInstalledVersion(); //// Assert Assert.AreEqual(expected, version); }
public void creates_valid_version_from_system_version() { System.Version version = new System.Version(78, 56, 34, 12); Version serializableVersion = new Version(version); Assert.AreEqual(version.Major, serializableVersion.Major, "Major number was not correctly parsed"); Assert.AreEqual(version.Minor, serializableVersion.Minor, "Minor number was not correctly parsed"); Assert.AreEqual(version.Build, serializableVersion.Build, "Build number was not correctly parsed"); Assert.AreEqual(version.Revision, serializableVersion.Revision, "Revision number was not correctly parsed"); }
internal OperatingSystem(PlatformID platform, System.Version version, string servicePack) { if ((platform < PlatformID.Win32S) || (platform > PlatformID.MacOSX)) { throw new ArgumentException(Environment.GetResourceString("Arg_EnumIllegalVal", new object[] { (int) platform }), "platform"); } if (version == null) { throw new ArgumentNullException("version"); } this._platform = platform; this._version = (System.Version) version.Clone(); this._servicePack = servicePack; }
//--------------------------------------------------------------------- public ExtensionInfo(string name, string version, string type, string assemblyName, string className, string description, string userGuidePath, System.Version coreVersion) { persistentInfo = new PersistentDataset.ExtensionInfo(); persistentInfo.Name = name; persistentInfo.Version = version; persistentInfo.TypeName = type; persistentInfo.AssemblyName = assemblyName; persistentInfo.ClassName = className; persistentInfo.Description = description; persistentInfo.UserGuidePath = userGuidePath; this.coreVersion = coreVersion; }
private OperatingSystem(SerializationInfo info, StreamingContext context) { SerializationInfoEnumerator enumerator = info.GetEnumerator(); while (enumerator.MoveNext()) { string name = enumerator.Name; if (name != null) { if (!(name == "_version")) { if (name == "_platform") { goto Label_0067; } if (name == "_servicePack") { goto Label_0089; } } else { this._version = (System.Version) info.GetValue("_version", typeof(System.Version)); } } continue; Label_0067: this._platform = (PlatformID) info.GetValue("_platform", typeof(PlatformID)); continue; Label_0089: this._servicePack = info.GetString("_servicePack"); } if (this._version == null) { throw new SerializationException(Environment.GetResourceString("Serialization_MissField", new object[] { "_version" })); } }
public static string GetPlatformExtensionSDKLocation(string sdkMoniker, string targetPlatformIdentifier, System.Version targetPlatformVersion, string[] diskRoots, string[] extensionDiskRoots, string registryRoot) { throw null; }
public static System.Collections.Generic.IEnumerable <string> GetFoldersInVSInstalls(System.Version minVersion = null, System.Version maxVersion = null, string subFolder = null) { throw null; }
public static System.Collections.Generic.IDictionary <string, string> FilterPlatformExtensionSDKs(System.Version targetPlatformVersion, System.Collections.Generic.IDictionary <string, string> extensionSdks) { throw null; }
public TargetPlatformSDK(string targetPlatformIdentifier, System.Version targetPlatformVersion, string path) { }
public static System.Collections.Generic.IEnumerable <string> GetPlatformsForSDK(string sdkIdentifier, System.Version sdkVersion) { throw null; }
public static string GetPlatformSDKLocation(string targetPlatformIdentifier, System.Version targetPlatformVersion) { throw null; }
public NuGetVersion(System.Version version, string releaseLabel = null, string metadata = null) : base(default(NuGet.Versioning.SemanticVersion)) { }
public NuGetVersion(System.Version version, System.Collections.Generic.IEnumerable <string> releaseLabels, string metadata, string originalVersion) : base(default(NuGet.Versioning.SemanticVersion)) { }
public MSWebDelegationAssembly(System.Version verToLoad) : base(MSWebDelegationAssembly.AssemblyName, verToLoad, "31bf3856ad364e35") { }
static AssemblyName CreateAssemblyName(MetadataReader mdReader, StringHandle name, System.Version version, StringHandle culture) { var cultureString = mdReader.GetString(culture); var assemblyName = new AssemblyName() { Name = mdReader.GetString(name), Version = version }; if (cultureString != "neutral") { assemblyName.CultureInfo = CultureInfo.GetCultureInfo(cultureString); } return(assemblyName); }
public override bool Construct() { HasSeparateThreadInstance = false; Version = new System.Version(1, 0); return(true); }
public static string GetAssemblyPath(System.Version version) { throw null; }
static VerInfo() { System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); Name = assembly.GetName().Name; Version = assembly.GetName().Version; object[] devph = assembly.GetCustomAttributes( typeof( DevelopPhaseAttribute ) , false ); if ( devph.Length > 0 ) { DevPhase = (devph[0] as DevelopPhaseAttribute).Phase; } object[] config = assembly.GetCustomAttributes( typeof( System.Reflection.AssemblyConfigurationAttribute ) , false ); if ( config.Length > 0 ) { Config = (config[0] as System.Reflection.AssemblyConfigurationAttribute).Configuration; } }
public static System.Collections.Generic.IDictionary <string, System.Tuple <string, string> > GetPlatformExtensionSDKLocationsAndVersions(string[] diskRoots, string registryRoot, string targetPlatformIdentifier, System.Version targetPlatformVersion) { throw null; }
static void ParseServerMessage (string result) { if (string.IsNullOrEmpty(result)) { return; } hasParsedServerMessage = true; #if ASTARDEBUG Debug.Log("Result from update check:\n"+result); #endif string[] splits = result.Split('|'); latestVersionDescription = splits.Length > 1 ? splits[1] : ""; if (splits.Length > 4) { // First 4 are just compatibility fields var fields = splits.Skip(4).ToArray(); // Take all pairs of fields for (int i = 0; i < (fields.Length/2)*2; i += 2) { string key = fields[i]; string val = fields[i+1]; astarServerData[key] = val; } } try { latestVersion = new System.Version(astarServerData["VERSION:branch"]); } catch (System.Exception ex) { Debug.LogWarning("Could not parse version\n"+ex); } try { latestBetaVersion = new System.Version(astarServerData["VERSION:beta"]); } catch (System.Exception ex) { Debug.LogWarning("Could not parse version\n"+ex); } }
protected SemanticVersion(System.Version version, System.Collections.Generic.IEnumerable <string> releaseLabels, string metadata) { }
internal static string/*!*/ GetStrongName(string name, Version version, string culture, byte[] publicKey, bool retargetable) { if(version == null) version = new Version(); StringBuilder result = new StringBuilder(); result.Append(name); result.Append(", Version="); result.Append(version.ToString()); result.Append(", Culture="); result.Append(((culture == null || culture.Length == 0) ? "neutral" : culture)); result.Append(AssemblyNode.GetKeyString(publicKey)); if(retargetable) result.Append(", Retargetable=Yes"); return result.ToString(); }
protected SemanticVersion(System.Version version, string releaseLabel = null, string metadata = null) { }
public static string GetPlatformSDKLocation(string targetPlatformIdentifier, System.Version targetPlatformVersion, string[] diskRoots, string registryRoot) { throw null; }
public IHttpActionResult CheckUpgrade(UpgradeModel model) { if (!ModelState.IsValid) { throw new HttpResponseException(Request.CreateValidationErrorResponse(ModelState)); } int revision; int.TryParse(model.VersionComment, out revision); var version = new System.Version(model.VersionMajor, model.VersionMinor, model.VersionPatch, revision); var latestVersion = GetLatestVersionFromMajor(model.VersionMajor); if (latestVersion == null) { return(Json(new UpgradeResult(UpgradeType.None, "", ""))); } // Persist the update check for our statistics, don't remove! var caller = HttpContext.Current.Request.UserHostName + "_" + HttpContext.Current.Request.UserHostAddress; var callerHashed = FormsAuthentication.HashPasswordForStoringInConfigFile(caller, "sha1"); PersistUpdateCheck(callerHashed, model.VersionMajor, model.VersionMinor, model.VersionPatch, model.VersionComment); // End of persisting the update check for our statistics, don't remove! // Special case for 4.0.4.2, apperently we never recommended them to upgrade if (version == new System.Version(4, 0, 4, 2) || version == latestVersion) { return(Json(new UpgradeResult(UpgradeType.None, "", ""))); } if (version.Major == 4) { // We had some special cases in the old updatechecker so I left them here if (version == new System.Version(4, 0, 4, 1)) { return(Json(new UpgradeResult(UpgradeType.Minor, "4.0.4.2 is out with fixes for load-balanced sites.", "http://our.umbraco.org/download"))); } if (version == new System.Version(4, 0, 4, 0)) { return(Json(new UpgradeResult(UpgradeType.Critical, "4.0.4.1 is out fixing a serious macro bug. Please upgrade!", "http://our.umbraco.org/download"))); } if (version == new System.Version(4, 7, 0, 0)) { return(Json(new UpgradeResult(UpgradeType.Critical, "This Umbraco installation needs to be upgraded. It may contain a potential security issue!", "http://our.umbraco.org/download"))); } if (version >= new System.Version(4, 10, 0, 0) && version < latestVersion) { return(Json(new UpgradeResult(UpgradeType.Major, $"{latestVersion} is released. Upgrade today - it's free!", "http://our.umbraco.org/download"))); } } if (version.Major == 6) { if ((version < latestVersion)) { return(Json(new UpgradeResult(UpgradeType.Major, $"{latestVersion} is released. Upgrade today - it's free!", "http://our.umbraco.org/download"))); } } if (version.Major == 7 || version.Major == 8 || version.Major > 8) { if (version < latestVersion) { return(Json(new UpgradeResult(UpgradeType.Minor, $"{latestVersion} is released. Upgrade today - it's free!", $"http://our.umbraco.org/contribute/releases/{latestVersion.Major}{latestVersion.Minor}{latestVersion.Build}"))); } } // If nothing matches then it's probably a nightly or a very old version, no need to send upgrade message return(Json(new UpgradeResult(UpgradeType.None, "", ""))); }
public static System.Collections.Generic.IEnumerable <string> GetPlatformsForSDK(string sdkIdentifier, System.Version sdkVersion, string[] diskRoots, string registryRoot) { throw null; }
private void SetUnpackedValueOfReference(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty unpackingContext, System.Version unpackedValue) { unpackingContext.Reference = unpackedValue; }
public AssemblyFoldersFromConfigInfo(string directoryPath, System.Version targetFrameworkVersion) { }
public static string WrongSQLiteVersion(System.Version actualversion, string expectedversion) { return(LC.L(@"Unsupported version of SQLite detected ({0}), must be {1} or higher", actualversion, expectedversion)); }
public static System.Collections.Generic.IList <Microsoft.Build.Utilities.TargetPlatformSDK> FilterTargetPlatformSdks(System.Collections.Generic.IList <Microsoft.Build.Utilities.TargetPlatformSDK> targetPlatformSdkList, System.Version osVersion, System.Version vsVersion) { throw null; }
protected internal override MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty UnpackFromCore(MsgPack.Unpacker unpacker) { MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty result = default(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty); result = new MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty(); if (unpacker.IsArrayHeader) { int unpacked = default(int); int itemsCount = default(int); itemsCount = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); System.Version nullable = default(System.Version); if ((unpacked < itemsCount)) { if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(0); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable = default(MsgPack.Unpacker); disposable = unpacker.ReadSubtree(); try { nullable = this._serializer1.UnpackFrom(disposable); } finally { if (((disposable == null) == false)) { disposable.Dispose(); } } } } if (((nullable == null) == false)) { result.Reference = nullable; } unpacked = (unpacked + 1); } else { int itemsCount0 = default(int); itemsCount0 = MsgPack.Serialization.UnpackHelpers.GetItemsCount(unpacker); for (int i = 0; (i < itemsCount0); i = (i + 1)) { string key = default(string); string nullable0 = default(string); nullable0 = MsgPack.Serialization.UnpackHelpers.UnpackStringValue(unpacker, typeof(MsgPack.Serialization.PolymorphicMemberTypeKnownType_Normal_ReferenceReadWriteProperty), "MemberName"); if (((nullable0 == null) == false)) { key = nullable0; } else { throw MsgPack.Serialization.SerializationExceptions.NewNullIsProhibited("MemberName"); } if ((key == "Reference")) { System.Version nullable1 = default(System.Version); if ((unpacker.Read() == false)) { throw MsgPack.Serialization.SerializationExceptions.NewMissingItem(i); } if (((unpacker.IsArrayHeader == false) && (unpacker.IsMapHeader == false))) { nullable1 = this._serializer1.UnpackFrom(unpacker); } else { MsgPack.Unpacker disposable0 = default(MsgPack.Unpacker); disposable0 = unpacker.ReadSubtree(); try { nullable1 = this._serializer1.UnpackFrom(disposable0); } finally { if (((disposable0 == null) == false)) { disposable0.Dispose(); } } } if (((nullable1 == null) == false)) { result.Reference = nullable1; } } else { unpacker.Skip(); } } } return(result); }
public static string GetPlatformExtensionSDKLocation(string sdkMoniker, string targetPlatformIdentifier, System.Version targetPlatformVersion) { throw null; }
public override bool Construct() { Version = new System.Version(1, 0, 0, 2); return true; }
public static System.Collections.Generic.IDictionary <string, string> GetPlatformExtensionSDKLocations(string targetPlatformIdentifier, System.Version targetPlatformVersion) { throw null; }
public UnpackingContext(System.Version Reference) { this.Reference = Reference; }
public static bool IsVersionCompatible(this Assembly assembly, string otherVersion) { // according to http://semver.org/ versions are compatible so long as they are part of the same major version var ver = new System.Version(otherVersion); return assembly.GetName().Version.Major == ver.Major; }
public Range(System.Version start, System.Version finish, System.Version frameworkVersion) { }
static void ShowUpdateWindowIfRelevant () { try { System.DateTime remindDate; var remindVersion = new System.Version(EditorPrefs.GetString("AstarRemindUpdateVersion", "0.0.0.0")); if (latestVersion == remindVersion && System.DateTime.TryParse(EditorPrefs.GetString("AstarRemindUpdateDate", "1/1/1971 00:00:01"), out remindDate)) { if (System.DateTime.UtcNow < remindDate) { // Don't remind yet return; } } else { EditorPrefs.DeleteKey("AstarRemindUpdateDate"); EditorPrefs.DeleteKey("AstarRemindUpdateVersion"); } } catch { Debug.LogError("Invalid AstarRemindUpdateVersion or AstarRemindUpdateDate"); } var skipVersion = new System.Version(EditorPrefs.GetString("AstarSkipUpToVersion", AstarPath.Version.ToString())); if (AstarPathEditor.FullyDefinedVersion(latestVersion) != AstarPathEditor.FullyDefinedVersion(skipVersion) && AstarPathEditor.FullyDefinedVersion(latestVersion) > AstarPathEditor.FullyDefinedVersion(AstarPath.Version)) { EditorPrefs.DeleteKey("AstarSkipUpToVersion"); EditorPrefs.DeleteKey("AstarRemindUpdateDate"); EditorPrefs.DeleteKey("AstarRemindUpdateVersion"); AstarUpdateWindow.Init(latestVersion, latestVersionDescription); } }
public bool IsInRange(System.Version version) { throw null; }
private void SetUnpackedValueOfReference(UnpackingContext unpackingContext, System.Version unpackedValue) { unpackingContext.Reference = unpackedValue; }
/// <summary> /// Initializes a new instance of the <see cref="ConnectVersion"/> class. /// </summary> public ConnectVersion() { AssemblyName assemblyName = Assembly.GetCallingAssembly().GetName(); _version = assemblyName.Version; }
public override bool Construct() { HasSeparateThreadInstance = false; Version = new System.Version(1, 0); return true; }
public static Tag SelectVersionTag(this Repository repository, Version version) { return(repository.Tags.SingleOrDefault(t => t.IsAnnotated && t.Annotation.Name == $"v{version}")); }
public ExecuteMethod() { _currentVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; _outputText = new System.Text.StringBuilder(); _mockConsole = new StringWriter(_outputText); _actualConsole = System.Console.Out; System.Console.SetOut(_mockConsole); }