Example #1
0
        public override bool Execute(LamarServicesInput input)
        {
            using (var host = input.BuildHost())
            {
                var container = TypeExtensions.As <IContainer>(host.Services);



                var query = input.ToModelQuery(container);

                var display = input.BuildPlansFlag ? WhatDoIHaveDisplay.BuildPlan : WhatDoIHaveDisplay.Summary;

                var writer = new WhatDoIHaveWriter(container.Model);

                var text = writer.GetText(query, display: display);

                if (input.FileFlag.IsNotEmpty())
                {
                    var fullPath = input.FileFlag.ToFullPath();
                    Console.WriteLine("Writing the query results to " + fullPath);

                    File.WriteAllText(fullPath, text);
                }
                else
                {
                    Console.WriteLine(text);
                }
            }

            return(true);
        }
Example #2
0
 public MartenLinqQueryable(IMartenSession session, Expression expression) : base(new MartenLinqQueryProvider(session),
                                                                                  expression)
 {
     Session        = session;
     MartenProvider = TypeExtensions.As <MartenLinqQueryProvider>(Provider);
 }
Example #3
0
 public MartenLinqQueryable(QuerySession session) : base(new MartenLinqQueryProvider(session))
 {
     Session        = session;
     MartenProvider = TypeExtensions.As <MartenLinqQueryProvider>(Provider);
 }
Example #4
0
 public T CustomizeOutgoing(Action <Envelope> customize)
 {
     _endpoint.Customizations.Add(customize);
     return(TypeExtensions.As <T>(this));
 }
Example #5
0
 public T Lightweight()
 {
     _endpoint.IsDurable = false;
     return(TypeExtensions.As <T>(this));
 }
Example #6
0
 public T Durably()
 {
     _endpoint.IsDurable = true;
     return(TypeExtensions.As <T>(this));
 }
 public T SendInline()
 {
     _endpoint.Mode = EndpointMode.Inline;
     return(TypeExtensions.As <T>(this));
 }
 public T BufferedInMemory()
 {
     _endpoint.Mode = EndpointMode.BufferedInMemory;
     return(TypeExtensions.As <T>(this));
 }
 public T Durably()
 {
     _endpoint.Mode = EndpointMode.Durable;
     return(TypeExtensions.As <T>(this));
 }