Beispiel #1
0
        public static void Main()
        {
            var log = LoggerFactory.GetLogger();

            log.Info("Examples are just about to start.");

            QuickStart.Start();

            BasicModelOperationsExample.Create();
            BasicModelOperationsExample.Retrieve();
            BasicModelOperationsExample.Update();
            BasicModelOperationsExample.Delete();

            log.Warn("Always use LINQ instead of general iterations!");

            LinqExample.SelectionWithLinq();
            LinqExample.SelectionWithoutLinq();
            LinqExample.SelectionWithLinqLanguage();

            log.Error("This is how the error would be logged with log4net.");

            FederationExample.CreateFederation();
            ChangeLogExample.CreateLog();
            StepToXmlExample.Convert();

            log.Info("All examples finished.");
        }
Beispiel #2
0
        public static void Main()
        {
            // set up Serilog or any other provider which imlements Microsoft.Extensions.Logging.ILogger
            Log.Logger = new LoggerConfiguration()
                         .Enrich.FromLogContext()
                         .WriteTo.Console()
                         .CreateLogger();

            // set up binding to MS Abstractions
            var lf  = new LoggerFactory().AddSerilog();
            var log = lf.CreateLogger("ApplicationLogging");

            // make it available to xBIM
            XbimLogging.LoggerFactory = lf;

            // use the log yourself
            log.LogInformation("Examples are just about to start.");

            QuickStart.Start();

            BasicModelOperationsExample.Create();
            BasicModelOperationsExample.Retrieve();
            BasicModelOperationsExample.Update();
            BasicModelOperationsExample.Delete();

            log.LogWarning("Always use LINQ instead of general iterations!");

            CubeWithColourExample.Run();

            LinqExample.SelectionWithLinq();
            LinqExample.SelectionWithoutLinq();
            LinqExample.SelectionWithLinqLanguage();

            log.LogError("This is how the error would be logged with Serilog.");

            BasicFederationExample.Run();

            InverseSearchExample.Run();

            FederationExample.CreateFederation();
            ChangeLogExample.CreateLog();
            StepToXmlExample.Convert();

            SpatialStructureExample.Show();

            NestedCartesianPointListExample.Run();

            SingleObjectExample.Run();

            GetMaterialsAndContainmentExample.Run();

            log.LogInformation("All examples finished.");
        }
Beispiel #3
0
        public static void Main()
        {
            //IfcValueEnum.Export();
            //return;

            var log = LoggerFactory.GetLogger();

            log.Info("Examples are just about to start.");

            QuickStart.Start();

            BasicModelOperationsExample.Create();
            BasicModelOperationsExample.Retrieve();
            BasicModelOperationsExample.Update();
            BasicModelOperationsExample.Delete();

            log.Warn("Always use LINQ instead of general iterations!");

            LinqExample.SelectionWithLinq();
            LinqExample.SelectionWithoutLinq();
            LinqExample.SelectionWithLinqLanguage();

            log.Error("This is how the error would be logged with log4net.");

            FederationExample.CreateFederation();
            ChangeLogExample.CreateLog();
            StepToXmlExample.Convert();

            SpatialStructureExample.Show();

            ExpandExample.ExpandAttributes();

            NestedCartesianPointListExample.Run();

            log.Info("All examples finished.");
        }