本文整理匯總了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);
}