Ejemplo n.º 1
0
        public ServerModel(DebugInterceptor interceptor)
        {
            ServerConfigFile = Path.Combine(
                SettingsFileLocator.LocateConfigurationFolder(),
                "HDE.IpCamClientServer.Server.ServerC.xml");

            MovementDetection = (IHandler)Type
                                .GetType(ConfigurationSettings.AppSettings["MovementDetector.Type"])
                                .GetConstructor(new [] { typeof(IInterceptor) })
                                .Invoke(new object[] { interceptor });
            interceptor.Initialize(MovementDetection.GetDebugWindows());
            MovementDetection.Configure(ConfigurationSettings.AppSettings["MovementDetector.Parameters"]);
        }
Ejemplo n.º 2
0
        public void pdf1_1_EmptyTest()
        {
            var ShellInterceptor = new DebugInterceptor();

            ShellInterceptor.OnInitEvent = (version) =>
            {
                System.Diagnostics.Debug.WriteLine("New process started for creating PDF with version: " + version);
                Assert.AreEqual("1.1", version);
            };

            ShellInterceptor.OnWriteHeaderEvent = (pdfHeader) =>
            {
                string pdf_text = pdfHeader.Write();
                System.Diagnostics.Debug.Write(pdf_text);
                Assert.AreEqual("%PDF-1.1\n", pdf_text);
            };

            ShellInterceptor.OnWriteObjectEvent = (pdfObject) =>
            {
                string pdf_text = pdfObject.Write();
                System.Diagnostics.Debug.Write(pdf_text);
            };

            ShellInterceptor.OnWriteXrefEvent = (pdfXref) =>
            {
                string pdf_text = pdfXref.Write();
                System.Diagnostics.Debug.Write(pdf_text);
            };

            ShellInterceptor.OnWriteTrailerEvent = (pdfTrailer) =>
            {
                string pdf_text = pdfTrailer.Write();
                System.Diagnostics.Debug.Write(pdf_text);
            };

            ShellInterceptor.OnWriteEofEvent = (pdfEof) =>
            {
                string pdf_text = pdfEof.Write();
                System.Diagnostics.Debug.Write(pdf_text);
            };

            var pdf = Shell.NewPDF(ShellInterceptor).Version().AddPage().Export();
        }