当前位置: 首页>>代码示例>>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;未经允许,请勿转载。