예제 #1
0
        public void Test2( )
        {
            PresentationTraceSources.Refresh();
            var x1 = new NLogTraceListener {
                ForceLogLevel = LogLevel.Debug
            };

            PresentationTraceSources.MarkupSource.Listeners.Add(x1);
            PresentationTraceSources.MarkupSource.Switch.Level = SourceLevels.All;
            var x    = new ProxyUtils(WriteOut, ProxyUtilsBase.CreateInterceptor(WriteOut));
            var @out = x.TransformXaml2(@"files/test.xaml");

            Logger.Debug("{out}", @out);
        }
예제 #2
0
        public void Test1()
        {
            var p = new ProxyUtils(WriteOut, ProxyUtilsBase.CreateInterceptor(WriteOut));
            var xamlSchemaContext = p.CreateXamlSchemaContext();

            Logger.Info("{schemaContext}", xamlSchemaContext);
            foreach (var ns in xamlSchemaContext.GetAllXamlNamespaces())
            {
                var allXamlTypes = xamlSchemaContext.GetAllXamlTypes(ns);
                Logger.Debug("{numtypes} {namespace}", allXamlTypes.Count, ns);

                // continue ;
                foreach (var t in allXamlTypes)
                {
                    if (t.IsMarkupExtension)
                    {
                        Logger.Debug("{t}", t);
                    }
                }
            }
        }