本文整理汇总了C#中DataType.Accept方法的典型用法代码示例。如果您正苦于以下问题:C# DataType.Accept方法的具体用法?C# DataType.Accept怎么用?C# DataType.Accept使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataType
的用法示例。
在下文中一共展示了DataType.Accept方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Replace
public DataType Replace(DataType dt)
{
return dt != null
? dt.Accept(this)
: null;
}
示例2: WriteEntry
private void WriteEntry(TypeVariable tv, DataType dt, Formatter writer)
{
writer.Write("{0}: ", tv);
if (dt != null)
{
dt.Accept(new TypeGraphWriter(writer));
WriteExpressionOf(tv, writer);
}
writer.WriteLine();
}
示例3: AddUserGlobalItem
// Mutators /////////////////////////////////////////////////////////////////
/// <summary>
/// This method is called when the user has created a global item.
/// </summary>
/// <param name="address"></param>
/// <param name="dataType"></param>
/// <returns></returns>
public ImageMapItem AddUserGlobalItem(Address address, DataType dataType)
{
var size = GetDataSize(address, dataType);
var item = new ImageMapItem
{
Address = address,
Size = size,
DataType = dataType,
};
if (size != 0)
this.ImageMap.AddItemWithSize(address, item);
else
this.ImageMap.AddItem(address, item);
this.UserGlobalData.Add(address, new Serialization.GlobalDataItem_v2
{
Address = address.ToString(),
DataType = dataType.Accept(new Serialization.DataTypeSerializer()),
});
return item;
}
示例4: AddUserGlobalItem
// Mutators /////////////////////////////////////////////////////////////////
/// <summary>
/// This method is called when the user has created a global item.
/// </summary>
/// <param name="address"></param>
/// <param name="dataType"></param>
/// <returns></returns>
public ImageMapItem AddUserGlobalItem(Address address, DataType dataType)
{
//$TODO: if user enters a segmented address, we need to
// place the item in the respective globals struct.
var size = GetDataSize(address, dataType);
var item = new ImageMapItem
{
Address = address,
Size = size,
DataType = dataType,
};
if (size != 0)
this.ImageMap.AddItemWithSize(address, item);
else
this.ImageMap.AddItem(address, item);
this.User.Globals.Add(address, new Serialization.GlobalDataItem_v2
{
Address = address.ToString(),
DataType = dataType.Accept(new Serialization.DataTypeSerializer()),
});
return item;
}