本文整理汇总了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");
}
示例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 ();
}
示例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 ();
}
示例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 ();
}
示例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 ();
}
示例6: NullObjectGetValueTypeNameIsNull
public void NullObjectGetValueTypeNameIsNull ()
{
ResXDataNode node = new ResXDataNode ("aname", (object) null);
Assert.IsNull (node.GetValueTypeName ((AssemblyName []) null), "#A1");
}
示例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);
}
示例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);
}