當前位置: 首頁>>代碼示例>>C#>>正文


C# ResXDataNode.GetValueTypeName方法代碼示例

本文整理匯總了C#中System.Resources.ResXDataNode.GetValueTypeName方法的典型用法代碼示例。如果您正苦於以下問題:C# ResXDataNode.GetValueTypeName方法的具體用法?C# ResXDataNode.GetValueTypeName怎麽用?C# ResXDataNode.GetValueTypeName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Resources.ResXDataNode的用法示例。


在下文中一共展示了ResXDataNode.GetValueTypeName方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ITRSNotUsedWhenNodeCreatedNew

		public void ITRSNotUsedWhenNodeCreatedNew ()
		{
			ResXDataNode node;
			node = new ResXDataNode ("along", 34L);

			string returnedType = node.GetValueTypeName (new ReturnIntITRS ());
			Assert.AreEqual ((typeof (long)).AssemblyQualifiedName, returnedType, "#A1");
		}
開發者ID:Profit0004,項目名稱:mono,代碼行數:8,代碼來源:ResXDataNodeTypeConverterGetValueTypeNameTests.cs

示例2: IconEntry

        public IconEntry(ResourceCatalog _owner, ResXDataNode _node, bool isMeta)
        {
            if (_node == null)
                throw new ArgumentNullException ("node");

            string nodeTypeName = _node.GetValueTypeName ((AssemblyName []) null);
            if (!nodeTypeName.StartsWith ("System.Drawing.Icon, System.Drawing"))
                throw new ArgumentException ("node","Invalid resource type");

            if (_owner == null)
                throw new ArgumentNullException ("owner");
            IsMeta = isMeta;
            Owner = _owner;
            node = _node;
            SetRelativePos ();
        }
開發者ID:mono-soc-2012,項目名稱:ressource-md-addin,代碼行數:16,代碼來源:IconEntry.cs

示例3: StringEntry

        public StringEntry(ResourceCatalog _owner, ResXDataNode _node, bool isMeta)
        {
            if (_node == null)
                throw new ArgumentNullException ("node");
            if (!_node.GetValueTypeName ((AssemblyName []) null).StartsWith ("System.String, mscorlib"))
                throw new ArgumentException ("node","Should be string resource");
            if (_node.FileRef != null)
                throw new ArgumentException ("node", "FileRef should not be set");
            if (_owner == null)
                throw new ArgumentNullException ("owner");

            IsMeta = isMeta;
            Owner = _owner;
            node = _node;
            SetRelativePos ();
        }
開發者ID:mono-soc-2012,項目名稱:ressource-md-addin,代碼行數:16,代碼來源:StringEntry.cs

示例4: BinaryOrStringEntry

        public BinaryOrStringEntry(ResourceCatalog _owner, ResXDataNode _node, bool isMeta)
        {
            if (_node == null)
                throw new ArgumentNullException ("node");
            if (_node.FileRef == null)
                throw new ArgumentNullException ("node","FileRef should be set");

            string nodeTypeName = _node.GetValueTypeName ((AssemblyName []) null);
            if (!nodeTypeName.StartsWith ("System.String, mscorlib") &&
                !nodeTypeName.StartsWith ("System.Byte[], mscorlib"))
                throw new ArgumentException ("node","Only string or byte[] TypeName allowed");

            if (_owner == null)
                throw new ArgumentNullException ("owner");
            IsMeta = isMeta;
            Owner = _owner;
            node = _node;
            SetRelativePos ();
        }
開發者ID:mono-soc-2012,項目名稱:ressource-md-addin,代碼行數:19,代碼來源:BinaryOrStringFileEntry.cs

示例5: OtherFileEntry

        public OtherFileEntry(ResourceCatalog _owner, ResXDataNode _node, bool isMeta)
        {
            if (_node == null)
                throw new ArgumentNullException ("node");
            if (_node.FileRef == null)
                throw new ArgumentNullException ("node","FileRef should be set");

            string nodeTypeName = _node.GetValueTypeName ((AssemblyName []) null);
            if (nodeTypeName.StartsWith ("System.String, mscorlib") ||
                nodeTypeName.StartsWith ("System.Drawing.Bitmap, System.Drawing") ||
                nodeTypeName.StartsWith ("System.Drawing.Icon, System.Drawing") ||
                nodeTypeName.StartsWith ("System.IO.MemoryStream, mscorlib"))
                throw new ArgumentException ("node","Invalid resource type");

            if (_owner == null)
                throw new ArgumentNullException ("owner");
            IsMeta = isMeta;
            Owner = _owner;
            node = _node;
            SetRelativePos ();
        }
開發者ID:mono-soc-2012,項目名稱:ressource-md-addin,代碼行數:21,代碼來源:OtherFileEntry.cs

示例6: NullObjectGetValueTypeNameIsNull

		public void NullObjectGetValueTypeNameIsNull ()
		{
			ResXDataNode node = new ResXDataNode ("aname", (object) null);
			Assert.IsNull (node.GetValueTypeName ((AssemblyName []) null), "#A1");
		}
開發者ID:GirlD,項目名稱:mono,代碼行數:5,代碼來源:ResXDataNodeTest.cs

示例7: IfTypeResolutionFailsReturnsOrigString

		public void IfTypeResolutionFailsReturnsOrigString()
		{
			ResXFileRef fileRef = new ResXFileRef ("afile.name", "a.type.name");
			ResXDataNode node = new ResXDataNode ("aname", fileRef);

			string returnedType = node.GetValueTypeName ((AssemblyName []) null);
			Assert.AreEqual ("a.type.name", returnedType);
		}
開發者ID:nlhepler,項目名稱:mono,代碼行數:8,代碼來源:ResXDataNodeFileRefGetValueTypeNameTests.cs

示例8: AttemptsTypeResolution

		public void AttemptsTypeResolution ()
		{
			ResXFileRef fileRef = new ResXFileRef ("afile.name", "System.String");
			ResXDataNode node = new ResXDataNode ("aname", fileRef);

			string returnedType = node.GetValueTypeName ((AssemblyName []) null);
			Assert.AreEqual (typeof (string).AssemblyQualifiedName, returnedType);
		}
開發者ID:nlhepler,項目名稱:mono,代碼行數:8,代碼來源:ResXDataNodeFileRefGetValueTypeNameTests.cs


注:本文中的System.Resources.ResXDataNode.GetValueTypeName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。