Ejemplo n.º 1
0
        /// <summary>Creates an instance for the default language.</summary>
        /// <returns>A repository.</returns>
        public IEventRepository ForDefaultCulture()
        {
            var vector2DConverter                   = new Vector2DConverter();
            var vector3DConverter                   = new Vector3DConverter();
            var dynamicEventFlagConverter           = new DynamicEventFlagConverter();
            var dynamicEventFlagCollectionConverter = new DynamicEventFlagCollectionConverter(dynamicEventFlagConverter);
            var locationConverterFactory            = new LocationConverterFactory(vector2DConverter);
            var locationConverter                   = new LocationConverter(locationConverterFactory, vector3DConverter);
            var dynamicEventConverter               = new DynamicEventConverter(dynamicEventFlagCollectionConverter, locationConverter);
            var dynamicEventCollectionConverter     = new DynamicEventCollectionConverter(dynamicEventConverter);

            return(new EventRepository(this.serviceClient, dynamicEventCollectionConverter));
        }
Ejemplo n.º 2
0
        /// <summary>Creates an instance for the given language.</summary>
        /// <param name="culture">The culture.</param>
        /// <returns>A repository.</returns>
        public IEventRepository ForCulture(CultureInfo culture)
        {
            var vector2DConverter                   = new Vector2DConverter();
            var vector3DConverter                   = new Vector3DConverter();
            var dynamicEventFlagConverter           = new DynamicEventFlagConverter();
            var dynamicEventFlagCollectionConverter = new DynamicEventFlagCollectionConverter(dynamicEventFlagConverter);
            var locationConverterFactory            = new LocationConverterFactory(vector2DConverter);
            var locationConverter                   = new LocationConverter(locationConverterFactory, vector3DConverter);
            var dynamicEventConverter               = new DynamicEventConverter(dynamicEventFlagCollectionConverter, locationConverter);
            var dynamicEventCollectionConverter     = new DynamicEventCollectionConverter(dynamicEventConverter);
            IEventRepository repository             = new EventRepository(this.serviceClient, dynamicEventCollectionConverter);

            repository.Culture = culture;
            return(repository);
        }