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