本文整理汇总了C#中ClassType类的典型用法代码示例。如果您正苦于以下问题:C# ClassType类的具体用法?C# ClassType怎么用?C# ClassType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClassType类属于命名空间,在下文中一共展示了ClassType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ClassSymbol
protected ClassSymbol(ClassType type)
{
ClassType = type;
Block = new ProgramContext();
AppendChild(Block);
IsInitialize = true;
}
示例2: Class
public Class(CompilationUnit cu, ClassType t, Modifier m, IRegion region)
{
this.cu = cu;
classType = t;
this.region = region;
modifiers = (ModifierEnum)m;
}
示例3: Parse
// define event:
// !StreetChanged(string street, string houseNo)
// define command:
// ?ChangeStreet(Guid addressId, string street, string houseNo)
public void Parse(string line)
{
switch (line[0])
{
case '?': this.ClassType = ClassType.Event; break;
case '!': this.ClassType = ClassType.Command; break;
case '#': this.ClassType = ClassType.Handler; break;
default: throw new NotSupportedException(string.Format("Line start [{0}] is not supported.", line[0]));
}
line = line.Substring(1);
int index = line.IndexOf('(');
this.Name = line.Substring(0, index);
line = line.Substring(index + 1).Trim(new[] {'(', ')'});
while (line.Length > 0)
{
index = line.IndexOf(',');
if (index < 0)
{
index = line.Length;
}
string prop = line.Substring(0, index).Trim();
PropertyToGenerate propertyToGenerate = new PropertyToGenerate();
propertyToGenerate.Parse(prop);
this.Properties.Add(propertyToGenerate);
if (index + 1 < line.Length)
line = line.Substring(index + 1);
else
break;
}
}
示例4: CycleYear
public CycleYear(int year, CycleCode cycleCode, ClassType classType)
: this()
{
Year = year;
CycleCode = cycleCode;
ClassType = classType;
}
示例5: AirlinerClass
public AirlinerClass(ClassType type, int seatingCapacity)
{
this.Type = type;
this.SeatingCapacity = seatingCapacity;
this.RegularSeatingCapacity = seatingCapacity;
this.Facilities = new Dictionary<AirlinerFacility.FacilityType, AirlinerFacility>();
}
示例6: AssignClassSkills
private static void AssignClassSkills(CharacterBase character, ClassType type)
{
switch (type)
{
case ClassType.Bard:
AssignBardSkills(character);
break;
case ClassType.Berserker:
AssignBerserkerSkills(character);
break;
case ClassType.Crusader:
AssignCrusaderSkills(character);
break;
case ClassType.Elementalist:
AssignElementalistSkills(character);
break;
case ClassType.Monk:
AssignMonkSkills(character);
break;
case ClassType.Priest:
AssignPriestSkills(character);
break;
case ClassType.Ranger:
AssignRangerSkills(character);
break;
case ClassType.Rogue:
AssignRogueSkills(character);
break;
}
}
示例7: ClassProxy
public ClassProxy(IClass c)
{
this.FullyQualifiedName = c.FullyQualifiedName;
this.Documentation = c.Documentation;
this.modifiers = c.Modifiers;
this.classType = c.ClassType;
}
示例8: GetPrice
public static int GetPrice(DateTime classDate, ClassType classType)
{
int calculatedPrice = int.MaxValue;
int basePrice = 0;
int salePrice = 0;
switch (classType)
{
case ClassType.PMP:
calculatedPrice = basePrice = pmpCost;
salePrice = pmpCostSale;
break;
case ClassType.CAPM:
calculatedPrice = basePrice = capmCost;
salePrice = capmCostSale;
break;
case ClassType.SixSigmaGreenBelt:
calculatedPrice = basePrice = l6giCost;
salePrice = l6giCostSale;
break;
case ClassType.SixSigmaBlackBelt:
calculatedPrice = basePrice = l6biCost;
salePrice = l6biCostSale;
break;
}
if (salePrice >= 0)
calculatedPrice = salePrice;
if (classDate > DateTime.Now.AddDays(earlyBirdDuration))
{
calculatedPrice -= earlyBirdDiscountAmount;
}
if (calculatedPrice < basePrice)
return calculatedPrice;
else
return basePrice;
}
示例9: ClassBlock
public ClassBlock(string name, ClassType type)
{
Name = name;
Type = type;
_fields = new List<Field>();
_methods = new List<Method>();
}
示例10: CharacterClass
public CharacterClass(ClassType classType, int level, IClassModifier modifier)
{
ClassType = classType;
Level = level;
Modifier = modifier;
Saves = new ClassSaves(modifier.FortitudeSaveType, modifier.ReflexSaveType, modifier.WillSaveType, Level);
Attack = new Attack(_attackBonusses[modifier.AttackBonusType], level);
}
示例11: FigureToolboxItemNode
public FigureToolboxItemNode(string name, ClassType classType, bool isAbstract, Gdk.Pixbuf icon)
: base()
{
is_abstract = isAbstract;
_classType = classType;
Name = name;
Icon = icon;
}
示例12: Book
public Book(ClassType _t, int _pages, int _pict, int _tables, int _len)
{
this.pages = _pages;
this.type = _t;
this.pictures = _pict;
this.tables = _tables;
this.length = _len;
//this.signs = new Dictionary<int, int>();
}
示例13: CreateCharacter
/// <summary>
/// Creates a new character and levels it up to the given level
/// </summary>
public static ICharacter CreateCharacter(Race race, ClassType classType, int level, Dictionary<AbilityType, int> abilityScores)
{
var character = CreateCharacter(race, classType, abilityScores);
character.Experience.AddLevels(level);
while (character.Experience.CanLevel) {
character.LevelUp(classType);
}
return character;
}
示例14: GameDataObject
public GameDataObject(string name, string description, ClassType classType)
{
Name = name;
Description = description;
ClassType = classType;
BaseClasses = new List<string>();
Behaviours = new List<Behaviour>();
Properties = new List<Property>();
InOuts = new List<IO>();
}
示例15: ClassDeclaration
public ClassDeclaration(TextPosition tp, string name, ClassType type, TupleLiteral attr, TupleLiteral generic, TupleLiteral inherit, ProgramContext block)
: base(tp, name, type, block)
{
AttributeAccess = attr;
DecGenerics = generic;
InheritAccess = inherit;
AppendChild(AttributeAccess);
AppendChild(DecGenerics);
AppendChild(InheritAccess);
}