本文整理汇总了C#中RbSerializerN.sizeOf方法的典型用法代码示例。如果您正苦于以下问题:C# RbSerializerN.sizeOf方法的具体用法?C# RbSerializerN.sizeOf怎么用?C# RbSerializerN.sizeOf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RbSerializerN
的用法示例。
在下文中一共展示了RbSerializerN.sizeOf方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: sizeOf
public int sizeOf(RbSerializerN serializer, Object obje)
{
var obj = (TeamMessage) obje;
int s = serializer.sizeOf(obj.sender);
int r = serializer.sizeOf(obj.recipient);
int m = serializer.sizeOf(obj.message);
return RbSerializerN.SIZEOF_TYPEINFO + s + r + m;
}
示例2: sizeOf
public int sizeOf(RbSerializerN serializer, Object obje)
{
var obj = (BulletStatus) obje;
return RbSerializerN.SIZEOF_TYPEINFO + RbSerializerN.SIZEOF_INT + serializer.sizeOf(obj.victimName)
+ RbSerializerN.SIZEOF_BOOL + 2*RbSerializerN.SIZEOF_DOUBLE;
}
示例3: sizeOf
public int sizeOf(RbSerializerN serializer, object objec)
{
var obj = (ScannedRobotEvent) objec;
return RbSerializerN.SIZEOF_TYPEINFO + serializer.sizeOf(obj.name) + 5 * RbSerializerN.SIZEOF_DOUBLE + RbSerializerN.SIZEOF_BOOL;
}
示例4: sizeOf
public int sizeOf(RbSerializerN serializer, object objec)
{
var obj = (RobotDeathEvent) objec;
return RbSerializerN.SIZEOF_TYPEINFO + serializer.sizeOf(obj.robotName);
}
示例5: sizeOf
public int sizeOf(RbSerializerN serializer, object objec)
{
var obj = (BulletHitEvent) objec;
return RbSerializerN.SIZEOF_TYPEINFO + RbSerializerN.SIZEOF_INT + serializer.sizeOf(obj.name)
+ RbSerializerN.SIZEOF_DOUBLE;
}
示例6: sizeOf
public int sizeOf(RbSerializerN serializer, Object obje)
{
var obj = (DebugProperty) obje;
return RbSerializerN.SIZEOF_TYPEINFO + serializer.sizeOf(obj.key) + serializer.sizeOf(obj.value);
}
示例7: sizeOf
public int sizeOf(RbSerializerN serializer, object obje)
{
var obj = (RobotStatics) obje;
int size = RbSerializerN.SIZEOF_TYPEINFO
+ serializer.sizeOf(obj.robocodeVersion)
+ RbSerializerN.SIZEOF_BOOL * 9
+ serializer.sizeOf(obj.name)
+ serializer.sizeOf(obj.shortName)
+ serializer.sizeOf(obj.veryShortName)
+ serializer.sizeOf(obj.fullClassName)
+ serializer.sizeOf(obj.shortClassName)
+ RbSerializerN.SIZEOF_INT*6
+ RbSerializerN.SIZEOF_DOUBLE
+ RbSerializerN.SIZEOF_LONG;
if (obj.teammates != null)
{
foreach (String mate in obj.teammates)
{
size += serializer.sizeOf(mate);
}
}
size += RbSerializerN.SIZEOF_INT;
size += serializer.sizeOf(obj.teamName);
return size;
}
示例8: sizeOf
public int sizeOf(RbSerializerN serializer, Object obje)
{
var obj = (ExecCommands) obje;
int size = RbSerializerN.SIZEOF_TYPEINFO + 4*RbSerializerN.SIZEOF_DOUBLE;
size += 4*RbSerializerN.SIZEOF_BOOL;
size += 5*RbSerializerN.SIZEOF_INT;
size += 2*RbSerializerN.SIZEOF_DOUBLE;
size += 4*RbSerializerN.SIZEOF_BOOL;
size += serializer.sizeOf(obj.outputText);
size += serializer.sizeOf(obj.graphicsCalls);
// bullets
size += obj.bullets.Count*serializer.sizeOf(RbSerializerN.BulletCommand_TYPE, null);
size += 1;
// messages
foreach (TeamMessage m in obj.teamMessages)
{
size += serializer.sizeOf(RbSerializerN.TeamMessage_TYPE, m);
}
size += 1;
// properties
foreach (DebugProperty d in obj.debugProperties)
{
size += serializer.sizeOf(RbSerializerN.DebugProperty_TYPE, d);
}
size += 1;
return size;
}
示例9: sizeOf
public int sizeOf(RbSerializerN serializer, object objec)
{
var obj = (HitByBulletEvent) objec;
return RbSerializerN.SIZEOF_TYPEINFO + serializer.sizeOf(RbSerializerN.Bullet_TYPE, obj.bullet)
+ RbSerializerN.SIZEOF_DOUBLE;
}
示例10: sizeOf
public int sizeOf(RbSerializerN serializer, object objec)
{
var obj = (BattleEndedEvent) objec;
return RbSerializerN.SIZEOF_TYPEINFO + RbSerializerN.SIZEOF_BOOL
+ serializer.sizeOf(RbSerializerN.BattleResults_TYPE, obj.results);
}
示例11: sizeOf
public int sizeOf(RbSerializerN serializer, object objec)
{
var obj = (Bullet) objec;
return RbSerializerN.SIZEOF_TYPEINFO + 4*RbSerializerN.SIZEOF_DOUBLE + serializer.sizeOf(obj.ownerName)
+ serializer.sizeOf(obj.victimName) + RbSerializerN.SIZEOF_BOOL;
}
示例12: sizeOf
public int sizeOf(RbSerializerN serializer, object objec)
{
var obj = (BulletHitBulletEvent) objec;
return RbSerializerN.SIZEOF_TYPEINFO + RbSerializerN.SIZEOF_INT
+ serializer.sizeOf(RbSerializerN.Bullet_TYPE, obj.hitBullet);
}
示例13: sizeOf
public int sizeOf(RbSerializerN serializer, Object obje)
{
var obj = (ExecResults) obje;
int size = RbSerializerN.SIZEOF_TYPEINFO + 3*RbSerializerN.SIZEOF_BOOL;
size += serializer.sizeOf(RbSerializerN.ExecCommands_TYPE, obj.commands);
size += serializer.sizeOf(RbSerializerN.RobotStatus_TYPE, obj.status);
// events
foreach (Event evnt in obj.events)
{
size += serializer.sizeOf(evnt);
}
size += 1;
// messages
foreach (TeamMessage m in obj.teamMessages)
{
size += serializer.sizeOf(RbSerializerN.TeamMessage_TYPE, m);
}
size += 1;
// bullets
foreach (BulletStatus b in obj.bulletUpdates)
{
size += serializer.sizeOf(RbSerializerN.BulletStatus_TYPE, b);
}
size += 1;
return size;
}