public AbcTrait DefineSlot(object name, object type, bool isStatic) { if (name == null) { throw new ArgumentNullException("name"); } if (type == null) { throw new ArgumentNullException("type"); } var traitName = Abc.DefineName(name); var traits = isStatic ? Class.Traits : Traits; var trait = traits.Find(traitName, AbcTraitKind.Slot); if (trait != null) { return(trait); } var typeName = Abc.DefineTypeNameSafe(type); trait = AbcTrait.CreateSlot(typeName, traitName); traits.Add(trait); return(trait); }
public AbcTrait CreateSlot(object type, object name) { var typeName = DefineTypeNameSafe(type); var mn = DefineName(name); return(AbcTrait.CreateSlot(typeName, mn)); }
public AbcTrait CreateSlot(object name, object type, bool isStatic) { if (name == null) { throw new ArgumentNullException("name"); } if (type == null) { throw new ArgumentNullException("type"); } var traitName = Abc.DefineName(name); var typeName = Abc.DefineTypeNameSafe(type); var trait = AbcTrait.CreateSlot(typeName, traitName); AddTrait(trait, isStatic); return(trait); }