예제 #1
0
 public CharacterTransformer(ILogger <RowTransformerBase <CharacterRow, Character> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _intConverter             = new IntConverter();
     _stringToBooleanConverter = new StringToBooleanConverter();
     _realmConverter           = new TypeListConverter(new RealmList());
 }
예제 #2
0
 public EventTransformer(ILogger <RowTransformerBase <EventRow, Event> > logger) : base(logger)
 {
     //prepare converters so we only need one instance
     _dateConverter      = new DateConverter();
     _intConverter       = new IntConverter();
     _realmConverter     = new TypeListConverter(new RealmList());
     _eventTypeConverter = new TypeListConverter(new EventTypeList());
 }
예제 #3
0
        /// <summary>
        /// Extends ConvertTo so that methods that return a specific type object given a Type parameter can be
        /// used as generic method and casting is not required.
        /// <example>
        /// typeconverter.ConvertTo<int>(value);
        /// </example>
        /// </summary>
        public static T ConvertTo <T>(this TypeListConverter typeconverter, Object value)
        {
            if (typeconverter == null)
            {
                throw new ArgumentNullException("typeconverter");
            }

            return((T)typeconverter.ConvertTo(value, typeof(T)));
        }
예제 #4
0
        /// <summary>
        /// Extends ConvertTo so that methods that return a specific type object given a Type parameter can be
        /// used as generic method and casting is not required.
        /// <example>
        /// typelistconverter.ConvertTo<int>(context, culture, value);
        /// </example>
        /// </summary>
        public static T ConvertTo <T>(this TypeListConverter typelistconverter, ITypeDescriptorContext context, System.Globalization.CultureInfo culture, Object value)
        {
            if (typelistconverter == null)
            {
                throw new ArgumentNullException("typelistconverter");
            }

            return((T)typelistconverter.ConvertTo(context, culture, value, typeof(T)));
        }
예제 #5
0
 public MagiciteSkillTransformer(ILogger <RowTransformerBase <MagiciteSkillRow, MagiciteSkill> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _doubleConverter            = new DoubleConverter();
     _stringToBooleanConverter   = new StringToBooleanConverter();
     _percentConverter           = new PercentConverter();
     _abilityTypeConverter       = new TypeListConverter(new AbilityTypeList());
     _autoTargetTypeConverter    = new TypeListConverter(new AutoTargetTypeList());
     _damageFormulaTypeConverter = new TypeListConverter(new DamageFormulaTypeList());
     _elementConverter           = new TypeListConverter(new ElementList());
 }
예제 #6
0
 public OtherTransformer(ILogger <RowTransformerBase <OtherRow, Other> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _doubleConverter            = new DoubleConverter();
     _intConverter               = new IntConverter();
     _stringToBooleanConverter   = new StringToBooleanConverter();
     _abilityTypeConverter       = new TypeListConverter(new AbilityTypeList());
     _targetTypeConverter        = new TypeListConverter(new TargetTypeList());
     _autoTargetTypeConverter    = new TypeListConverter(new AutoTargetTypeList());
     _damageFormulaTypeConverter = new TypeListConverter(new DamageFormulaTypeList());
     _elementConverter           = new TypeListConverter(new ElementList());
     _schoolConverter            = new TypeListConverter(new SchoolList());
 }
예제 #7
0
 public DungeonTransformer(ILogger <RowTransformerBase <DungeonRow, Dungeon> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _intConverter   = new IntConverter();
     _realmConverter = new TypeListConverter(new RealmList());
 }
예제 #8
0
 public MissionTransformer(ILogger <RowTransformerBase <MissionRow, Mission> > logger) : base(logger)
 {
     _missionTypeConverter = new TypeListConverter(new MissionTypeList());
 }
예제 #9
0
 public LegendMateriaTransformer(ILogger <RowTransformerBase <LegendMateriaRow, LegendMateria> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _realmConverter           = new TypeListConverter(new RealmList());
     _stringToBooleanConverter = new StringToBooleanConverter();
 }
예제 #10
0
 public RecordSphereTransformer(ILogger <RowTransformerBase <RecordSphereRow, RecordSphere> > logger) : base(logger)
 {
     //prepare converters so we only need one instance no matter how many rows are processed
     _realmConverter = new TypeListConverter(new RealmList());
     _intConverter   = new IntConverter();
 }