/// <summary> /// Resolves namespace into array of global assembly (GAC) locations. /// </summary> /// <param name="namespaceStr">'namespace' name</param> /// <returns>collection of assembly file names wher namespace is impelemented</returns> static public string[] FindGlobalAssembly(String namespaceStr) { ArrayList retval = new ArrayList(); try { AssemblyEnum asmEnum = new AssemblyEnum(namespaceStr); String asmName; while ((asmName = asmEnum.GetNextAssembly()) != null) { string asmLocation = AssemblyCache.QueryAssemblyInfo(asmName); retval.Add(asmLocation); } } catch { //If exception is thrown it is very likely it is because where fusion.dll does not exist/unavailable/broken. //We might be running under the MONO run-time. } if (retval.Count == 0 && namespaceStr.ToLower().EndsWith(".dll")) { retval.Add(namespaceStr); //in case of if the namespaceStr is a dll name } return((string[])retval.ToArray(typeof(string))); }
public void TestNumber_WithEnum() { // number int | double | enum value var service = this.GetService(); AssemblyEnum value = AssemblyEnum.Other; var result = service.ToJson(value); Assert.AreEqual("1", result); }
public void TestNumber_WithEnum() { // number int | double | enum value var service = this.GetService(); AssemblyEnum value = AssemblyEnum.Other; var result = service.ToJsonValue(value); Assert.AreEqual(JsonValueType.Number, result.ValueType); Assert.AreEqual(1, ((JsonNumber)result).Value); }