Ejemplo n.º 1
0
 public MainPageViewModel(IEnumerable <IHostingContext> hostingContexts)
 {
     this.hostingContexts = hostingContexts;
     selectedLanguage     = hostingContexts.FirstOrDefault();
     PasteSampleCommand   = new DelegateCommand(PasteSample);
     ExecuteCommand       = new DelegateCommand(Execute);
 }
Ejemplo n.º 2
0
 public MainPageViewModel(IEnumerable<IHostingContext> hostingContexts)
 {
     this.hostingContexts = hostingContexts;
     selectedLanguage = hostingContexts.FirstOrDefault();
     PasteSampleCommand = new DelegateCommand(PasteSample);
     ExecuteCommand = new DelegateCommand(Execute);
 }
Ejemplo n.º 3
0
 internal RaftClusterMember(IHostingContext context, Uri remoteMember, Uri resourcePath)
     : base(context.CreateHttpHandler(), true)
 {
     this.resourcePath = resourcePath;
     this.context      = context;
     status            = new AtomicEnum <ClusterMemberStatus>(ClusterMemberStatus.Unknown);
     BaseAddress       = remoteMember;
     Endpoint          = remoteMember.ToEndPoint() ?? throw new UriFormatException(ExceptionMessages.UnresolvedHostName(remoteMember.Host));
     DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue(UserAgent, (GetType().Assembly.GetName().Version ?? new Version()).ToString()));
 }
Ejemplo n.º 4
0
 public void Configure(IHostingContext context)
 {
     context.BeforeExecute += (s, e) => Clear();
     context.SetFunction("line", new Action <double, double, double, double>(DrawLine));
     context.SetFunction("ellipse", new Action <double, double, double, double>(DrawEllipse));
     context.SetFunction("rect", new Action <double, double, double, double>(DrawRect));
     context.SetFunction("text", new Action <double, double, string>(DrawText));
     context.SetObject("g", wrapper);
     context.SetObject("m", typeof(Wrapper));
 }
 public void Configure(IHostingContext context)
 {
     context.BeforeExecute += (s, e) => Clear();
     context.SetFunction("line", new Action<double, double, double, double>(DrawLine));
     context.SetFunction("ellipse", new Action<double, double, double, double>(DrawEllipse));
     context.SetFunction("rect", new Action<double, double, double, double>(DrawRect));
     context.SetFunction("text", new Action<double, double, string>(DrawText));
     context.SetObject("g", wrapper);
     context.SetObject("m", typeof(Wrapper));
 }