コード例 #1
0
ファイル: Module.cs プロジェクト: nagor/Glimpse
        static Module()
        {
            RunningVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(2);

            Configuration = ConfigurationManager.GetSection("glimpse") as GlimpseConfiguration ?? new GlimpseConfiguration();

            Factory = new GlimpseFactory(Configuration);
            Logger = Factory.CreateLogger();

            Logger.Info(Configuration);

            RequestValidator = new GlimpseRequestValidator(Enumerable.Empty<IGlimpseValidator>(), Factory);

            Sanitizer = new CSharpSanitizer();

            Serializer = new GlimpseSerializer(Factory);

            Handlers = Enumerable.Empty<IGlimpseHandler>();

            Services = Enumerable.Empty<IGlimpseService>();

            Plugins = Enumerable.Empty<Lazy<IGlimpsePlugin, IGlimpsePluginRequirements>>();

            Logger.Info("Glimpse Module constructed");
        }
コード例 #2
0
        static Module()
        {
            Configuration = ConfigurationManager.GetSection("glimpse") as GlimpseConfiguration ?? new GlimpseConfiguration();

            Factory = new GlimpseFactory(Configuration);
            Logger = Factory.CreateLogger();

            Logger.Info(Configuration);

            RequestValidator = new GlimpseRequestValidator(Configuration, Enumerable.Empty<IGlimpseValidator>(), Factory);

            Sanitizer = new CSharpSanitizer();

            Serializer = new GlimpseSerializer(Factory);

            Handlers = Enumerable.Empty<IGlimpseHandler>();

            Plugins = Enumerable.Empty<Lazy<IGlimpsePlugin, IGlimpsePluginRequirements>>();

            Logger.Info("Glimpse Module constructed");
        }