/// <summary> /// Instantiates a new Formula predicate. /// </summary> /// <param name="resolutionType">The type of resolution for the formula.</param> /// <param name="bob">The business object binder to use when evaluating the formula, or null.</param> /// <param name="expression">The expression value, i.e. the C# code source that should be computable.</param> /// <param name="evaluator">A precompiled evaluator, or null.</param> private Formula(FormulaResolutionType resolutionType, IBinder bob, string expression, IDictionaryEvaluator evaluator):base(expression) { this.resolutionType = resolutionType; this.bob = bob; this.expression = expression; this.evaluator = evaluator; this.functionSignature = null; }
public static void RecordTime_Manual( DateTime startTime, IBinder binder, TextWriter logger) { RecordTime(binder, logger); }
protected RibNinjectModule([NotNull] IBinderHelper binderHelper, [NotNull] IBinder binder) { if (binderHelper == null) throw new ArgumentNullException(nameof(binderHelper)); if (binder == null) throw new ArgumentNullException(nameof(binder)); _binderHelper = binderHelper; _binder = binder; }
// This gets called once, the first time any client bind to the Service // and returns an instance of the LocationServicethis._binder. All future clients will // reuse the same instance of the this._binder public override IBinder OnBind (Intent intent) { Log.Debug (this._LogTag, "Client now bound to service"); this._binder = new TaskBinder (this); return this._binder; }
public override IBinder OnBind(Intent intent) { // This method must always be implemented Log.Debug(TAG, "OnBind"); this.Binder = new TimestampBinder(this); return this.Binder; }
/// <summary> /// Private constructor used for cloning. /// </summary> /// <param name="source">The source AtomFunction to use for building the new one.</param> private AtomFunction(AtomFunction source) : base(source) { this.bob = source.bob; this.functionSignature = source.functionSignature; this.resolutionType = source.resolutionType; }
public void OnServiceConnected(ComponentName name, IBinder binder) { _binder = binder as AndroidSensusServiceBinder; if (_binder != null && ServiceConnected != null) ServiceConnected(this, new AndroidServiceConnectedEventArgs(_binder)); }
public void PerformProcess(IBinder binder) { // generate dummy business objects IDictionary businessObjects = DummyData.GetInstance().GetBusinessObjects(nbDecaCustomers); // instantiate an inference engine, bind my data and process the rules IInferenceEngine ie = new IEImpl(binder); ie.LoadRuleBase(new RuleML09NafDatalogAdapter(ruleBaseFile, System.IO.FileAccess.Read)); ie.Process(businessObjects); // processing is done, let's analyze the results IList<IList<Fact>> qrs = ie.RunQuery("Fraudulent Customers"); Console.WriteLine("\nDetected {0} fraudulent customers.", qrs.Count); if (qrs.Count != 2 * nbDecaCustomers) Console.WriteLine("\nError! " + 2* nbDecaCustomers + " was expected."); // check if the customer objects have been flagged correctly int flaggedCount = 0; foreach(Customer customer in (ArrayList)businessObjects["CUSTOMERS"]) if (customer.Fraudulent) flaggedCount++; if (flaggedCount != 2 * nbDecaCustomers) throw new Exception("\nError! " + 2* nbDecaCustomers + " flagged Customer objects were expected.\n"); else Console.WriteLine("\nCustomer objects were correctly flagged\n"); }
// This gets called once, the first time any client bind to the Service // and returns an instance of the LocationServiceBinder. All future clients will // reuse the same instance of the binder public override IBinder OnBind (Intent intent) { Log.Debug (logTag, "Client now bound to service"); binder = new LocationServiceBinder (this); return binder; }
public void OnServiceConnected (ComponentName name, IBinder service) { Service = IAdditionServiceStub.AsInterface(service); _activity.Service = (IAdditionService) Service; _activity.IsBound = Service != null; }
public static void RecordTime_Queue( [QueueTrigger("test")] object args, IBinder binder, TextWriter logger) { RecordTime(binder, logger); }
public override async Task BindAsync(IBinder binder, Stream stream, IReadOnlyDictionary<string, string> bindingData) { string boundQueueName = QueueName; if (bindingData != null) { boundQueueName = _queueNameBindingTemplate.Bind(bindingData); } if (FileAccess == FileAccess.Write) { Stream queueStream = binder.Bind<Stream>(new QueueAttribute(boundQueueName)); await queueStream.CopyToAsync(stream); } else { IAsyncCollector<byte[]> collector = binder.Bind<IAsyncCollector<byte[]>>(new QueueAttribute(boundQueueName)); byte[] bytes; using (MemoryStream ms = new MemoryStream()) { stream.CopyTo(ms); bytes = ms.ToArray(); } await collector.AddAsync(bytes); } }
/// <summary> /// Handles the before add binding container event. /// /// Used to ensure the binding value is a <see cref="UnityEngine.MonoBehaviour"/>. /// </summary> /// <param name="source">Source.</param> /// <param name="binding">Binding.</param> protected void OnBeforeAddBinding(IBinder source, ref BindingInfo binding) { if (binding.value is Type && TypeUtils.IsAssignable(typeof(MonoBehaviour), binding.value as Type)) { throw new BindingException(CANNOT_RESOLVE_MONOBEHAVIOUR); } }
public void Init() { XmlConfigurator.Configure(new FileInfo("log4net_binderbackend.config")); binder = BinderSingleton.Instance; binder.Init(); binder.Start(); }
/// <summary> /// Reads a message from the "orders" queue and writes a blob in the "orders" container /// </summary> public static void QueueToBlob( [QueueTrigger("orders")] string orders, IBinder binder) { TextWriter writer = binder.Bind<TextWriter>(new BlobAttribute("orders/" + orders)); writer.Write("Completed"); }
public void OnServiceConnected(ComponentName name, IBinder service) { var mediaPlayerServiceBinder = service as MediaPlayerServiceBinder; if (mediaPlayerServiceBinder != null) { instance.OnServiceConnected(mediaPlayerServiceBinder); } }
public void SetUp() { testCommand = Substitute.For<CommandTest>(); testBinder = Substitute.For<IBinder>(); testSignal = new TestSignal(); testSignal.injector = testBinder; }
public void Init() { this.binder = new Binder(); //Binds some objects to use on tests. binder.Bind<IMockInterface>().To<MockIClassWithAttributes>(); binder.Bind(typeof(MockClassWithDependencies)).ToSelf(); }
public void OnServiceConnected (ComponentName name, IBinder service) { var serviceBinder = service as StepServiceBinder; if (serviceBinder != null) { activity.Binder = serviceBinder; activity.IsBound = true; } }
/// <summary> /// Instantiates a new AtomFunction. /// </summary> /// <param name="resolutionType">The type of resolution for the atom relation function.</param> /// <param name="negative">Negative Atom.</param> /// <param name="bob">The business object binder to use when evaluating the function.</param> /// <param name="type">The relation type of the Atom.</param> /// <param name="members">Array of predicates associated in the Atom.</param> public AtomFunction(RelationResolutionType resolutionType, bool negative, IBinder bob, string type, params IPredicate[] members) : this(resolutionType, negative, bob, type, members, null) { }
public void Setup() { XmlConfigurator.Configure(new FileInfo("log4net_binderfrontend.config")); BinderSingleton.Simple = true; binder = BinderSingleton.Instance; //Testing the Init lifecycle binder.Init(); }
public override void OnDestroy() { // This method is optional to implement Log.Debug(TAG, "OnDestroy"); Binder = null; timestamper = null; base.OnDestroy(); }
public void OnServiceConnected(ComponentName name, IBinder service) { if (service is CompassServiceBinder) { _compassServiceBinder = (CompassServiceBinder)service; OpenOptionsMenu(); } }
/// <summary> /// This is called when the connection with the service has been established. /// </summary> /// <param name="name">Name.</param> /// <param name="service">Service.</param> public void OnServiceConnected(ComponentName name, IBinder service) { LocationServiceBinder serviceBinder = service as LocationServiceBinder; if (serviceBinder != null) { this.binder = serviceBinder; ConnectionChanged(this, new ServiceConnectionEventArgs(true)); } }
/// <summary> /// Instantiates a new function predicate. /// </summary> /// <param name="resolutionType">The type of resolution for the function.</param> /// <param name="predicate">The predicate value, i.e. the string representation of the function predicate.</param> /// <param name="bob">The business object binder to use when evaluating the function, or null.</param> /// <param name="name">The name of the function, as it was analyzed by the binder.</param> /// <param name="arguments">The array of arguments of the function, as it was analyzed by the binder.</param> public Function(FunctionResolutionType resolutionType, string predicate, IBinder bob, string name, params string[] arguments):base(predicate) { this.resolutionType = resolutionType; this.bob = bob; this.name = name; this.arguments = arguments; // precalculate the function signature to use in the binder to evaluate the function functionSignature = Parameter.BuildFunctionSignature(name, arguments); }
public void OnServiceConnected (ComponentName name, IBinder service) { DataSyncBinderServiceProperty = service as DataSyncBinderService; this.IsBackgroundSyncBound = true; Task.Run (() => { DataSyncBinderServiceProperty.Service.SyncData (App.WorkoutCreatorContext.StaffMember.GymID); }); }
// This function will get triggered/executed when a new message is written // on an Azure Queue called queue. public static void ProcessQueueMessage([QueueTrigger("afro")] String message, TextWriter log, IBinder binder, Int32 dequeueCount) { log.WriteLine("este es el intento numero{0}", dequeueCount); if (dequeueCount <= 5) { binder.Bind<QueueAttribute>(new QueueAttribute("afro-poison")); } throw new Exception("throw perra"); }
public void OnServiceConnected (ComponentName name, IBinder service) { var serviceBinder = service as ServiceBinder; if (serviceBinder != null) { Binder = serviceBinder; Binder.IsBound = true; ServiceConnected(this, new ServiceConnectedEventArgs { Binder = service } ); } }
public void OnServiceConnected(ComponentName name, IBinder service) { playbackBinder = service as PlaybackBinder; if (playbackBinder == null) { throw new InvalidOperationException("Cannot bind to any service other than " + nameof(PlaybackService)); } OnPlaybackServiceBound(); }
/// <summary> /// Initializes a new instance of the <see cref="DefaultModelBinderLocator"/> class. /// </summary> /// <param name="binders">Available model binders</param> /// <param name="fallbackBinder">Fallback binder</param> public DefaultModelBinderLocator(IEnumerable<IModelBinder> binders, IBinder fallbackBinder) { this.fallbackBinder = fallbackBinder; if (binders != null) { this.binders = binders.ToArray(); } }
public static async Task Run([CosmosDBTrigger("StockBackend", "StockTransaction", ConnectionStringSetting = "CosmosDBConnection", LeaseCollectionName = "leases", LeaseDatabaseName = "StockBackend", LeasesCollectionThroughput = 400, CreateLeaseCollectionIfNotExists = true, FeedPollDelay = 500)] JArray input, IBinder binder, ILogger log) { if (input == null || input.Count <= 0) { return; } // StockDocument �փf�V���A���C�Y var documents = input.ToObject <StockDocument[]>(); // �ɏ��� SQL DB �ɏ������� var entities = documents.SelectMany(x => x.Items.Select(xs => new StockEntity { DocumentId = x.Id, TransactionId = x.TransactionId, TransactionDate = x.TransactionDate, TransactionType = x.TransactionType, LocationCode = x.LocationCode, CompanyCode = x.CompanyCode, StoreCode = x.StoreCode, TerminalCode = x.TerminalCode, LineNo = xs.LineNo, ItemCode = xs.ItemCode, Quantity = -xs.Quantity })); using (var context = new StockDbContext()) { await context.Stocks.AddRangeAsync(entities); await context.SaveChangesAsync(); } // SignalR Service �ւ̐ڑ������Z�b�g����Ă���ꍇ�̂ݗL���� if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("SignalRConnection", EnvironmentVariableTarget.Process))) { var signalRMessages = binder.Bind <IAsyncCollector <SignalRMessage> >(new SignalRAttribute { ConnectionStringSetting = "SignalRConnection", HubName = "monitor" }); // �ύX�ʒm�� SignalR �ő��M���� foreach (var document in documents) { foreach (var item in document.Items) { await signalRMessages.AddAsync(new SignalRMessage { Target = "update", Arguments = new object[] { document.TerminalCode, item.ItemCode } }); } } } // Application Insights �ɒʒm foreach (var document in documents) { _telemetryClient.TrackTrace("End Stock Processor", new Dictionary <string, string> { { "ActivityId", document.ActivityId } }); } }
static void TernaryThenCollect(IBinder windowToken) { System.IntPtr ptr = windowToken == null ? System.IntPtr.Zero : System.IntPtr.Zero; // `windowToken` should not be eligible for collection during this GC, but it is. System.GC.Collect(); }
private void OnGeneratorSelectorAttaching(GeneratorSelectorVM context, IBinder <IContextWrapper <GeneratorSelectorVM> > binder) { binder.AttachChild(context, _generatorSelectorV); }
static void BindAudioSource(IBinder Binder) { Binder.Bind <IAudioSource, NAudioSource>(); }
public static Task SubmitOrderAsync([ServiceBusTrigger("input-queue")] Message message, IBinder binder, Microsoft.Extensions.Logging.ILogger logger, CancellationToken cancellationToken) { logger.LogInformation("Creating brokered message receiver"); var handler = Bus.Factory.CreateBrokeredMessageReceiver(binder, cfg => { cfg.CancellationToken = cancellationToken; cfg.SetLog(logger); cfg.InputAddress = new Uri("sb://masstransit-build.servicebus.windows.net/input-queue"); cfg.UseRetry(x => x.Intervals(10, 100, 500, 1000)); cfg.Consumer(() => new SubmitOrderConsumer(cfg.Log)); }); return(handler.Handle(message)); }
/// <summary> /// Raises the <see cref="E:ElementChanged" /> event. /// </summary> /// <param name="e">The <see cref="ElementChangedEventArgs{Entry}"/> instance containing the event data.</param> protected override void OnElementChanged(ElementChangedEventArgs <Entry> e) { base.OnElementChanged(e); if (!((Control != null) & (e.NewElement != null))) { return; } if (!(e.NewElement is EnhancedEntry entryExt)) { return; } { Control.ImeOptions = getValueFromDescription(entryExt.ReturnKeyType); Control.SetImeActionLabel(entryExt.ReturnKeyType.ToString(), Control.ImeOptions); _gradientDrawable = new GradientDrawable(); _gradientDrawable.SetShape(ShapeType.Rectangle); _gradientDrawable.SetColor(entryExt.BackgroundColor.ToAndroid()); _gradientDrawable.SetCornerRadius(entryExt.CornerRadius); _gradientDrawable.SetStroke((int)entryExt.BorderWidth, entryExt.BorderColor.ToAndroid()); Rect padding = new Rect { Left = entryExt.LeftPadding, Right = entryExt.RightPadding, Top = entryExt.TopBottomPadding / 2, Bottom = entryExt.TopBottomPadding / 2 }; _gradientDrawable.GetPadding(padding); e.NewElement.Focused += (sender, evt) => { _gradientDrawable.SetStroke( (int)entryExt.BorderWidth, entryExt.FocusBorderColor.ToAndroid()); }; e.NewElement.Unfocused += (sender, evt) => { _gradientDrawable.SetStroke((int)entryExt.BorderWidth, entryExt.BorderColor.ToAndroid()); }; if (entryExt.EntryHeight != -1) { Control.SetHeight((int)DpToPixels(_context, entryExt.EntryHeight)); } Control.SetBackground(_gradientDrawable); if (Control != null && !string.IsNullOrEmpty(PackageName) && !string.IsNullOrEmpty(entryExt.LeftIcon)) { int identifier = Context.Resources.GetIdentifier( entryExt.LeftIcon, "drawable", PackageName); if (identifier != 0) { Drawable drawable = ContextCompat.GetDrawable(_context, identifier); if (drawable != null) { Control.SetCompoundDrawablesWithIntrinsicBounds(drawable, null, null, null); Control.CompoundDrawablePadding = entryExt.PaddingLeftIcon; entryExt.IconDrawableColorChanged += (sender, args) => { foreach (Drawable d in Control.GetCompoundDrawables()) { if (args.IsValid) { d?.SetColorFilter(new PorterDuffColorFilter(args.Color.ToAndroid(), PorterDuff.Mode.SrcIn)); } else { d?.ClearColorFilter(); } } }; } } } Control.EditorAction += (sender, args) => { if (entryExt.NextEntry == null) { if (_context.GetSystemService(Context.InputMethodService) is InputMethodManager inputMethodManager && _context is Activity) { Activity activity = (Activity)_context; IBinder token = activity.CurrentFocus?.WindowToken; inputMethodManager.HideSoftInputFromWindow(token, HideSoftInputFlags.None); activity.Window.DecorView.ClearFocus(); } } entryExt.EntryActionFired(); }; } }
internal BinderExpression(IBinder output, IBinder input) { this.Output = output; this.Input = input; }
public void OnServiceConnected(ComponentName name, IBinder service) { _musicPlayerService = ((MusicPlayerService.MusicPlayerServiceBinder)service).GetService(); }
public async Task <IActionResult> CustomerGroupDeletion([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req, ILogger log, IBinder binder) { return(await ValidateAndRouteMessage(req, "customergroupdeletion", binder, log)); }
public async Task <IActionResult> CollectionUpdate([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req, ILogger log, IBinder binder) { return(await ValidateAndRouteMessage(req, "collectionupdate", binder, log)); }
private async Task <IActionResult> ValidateAndRouteMessage(HttpRequest req, string messageTypeIdentifier, IBinder binder, ILogger log) { log.LogInformation("ShopifyWebhook recevied", messageTypeIdentifier); (bool requestIsValid, string requestBody) = await _validator.ValidateRequestAsync(req, shopifySharedSecret); if (!requestIsValid) { log.LogError("Invalid ShopifyWebhook recevied", messageTypeIdentifier); return(new BadRequestResult()); } var collector = await binder.BindAsync <IAsyncCollector <string> >(new ServiceBusAttribute(messageTypeIdentifier) { Connection = serviceBusConnectionSetting, EntityType = EntityType.Topic }); await collector.AddAsync(requestBody); return(new OkResult()); }
public async Task <IActionResult> ProductCreation([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req, ILogger log, IBinder binder) { return(await ValidateAndRouteMessage(req, "productcreation", binder, log)); }
// This gets called once, the first time any client bind to the Service // and returns an instance of the LocationServiceBinder. All future clients will // reuse the same instance of the binder public override IBinder OnBind(Intent intent) { binder = new LocationServiceBinder(this); return(binder); }
public object PerformInsert(SqlCommandInfo insertSQL, ISessionImplementor session, IBinder binder) { try { // prepare and execute the insert IDbCommand insert = session.Batcher.PrepareCommand(insertSQL.CommandType, insertSQL.Text, insertSQL.ParameterTypes); try { binder.BindValues(insert); session.Batcher.ExecuteNonQuery(insert); } finally { session.Batcher.CloseCommand(insert, null); } } catch (DbException sqle) { throw ADOExceptionHelper.Convert(session.Factory.SQLExceptionConverter, sqle, "could not insert: " + persister.GetInfoString(), insertSQL.Text); } SqlString selectSQL = SelectSQL; using (new SessionIdLoggingContext(session.SessionId)) try { //fetch the generated id in a separate query IDbCommand idSelect = session.Batcher.PrepareCommand(CommandType.Text, selectSQL, ParametersTypes); try { BindParameters(session, idSelect, binder.Entity); IDataReader rs = session.Batcher.ExecuteReader(idSelect); try { return(GetResult(session, rs, binder.Entity)); } finally { session.Batcher.CloseReader(rs); } } finally { session.Batcher.CloseCommand(idSelect, null); } } catch (DbException sqle) { throw ADOExceptionHelper.Convert(session.Factory.SQLExceptionConverter, sqle, "could not retrieve generated id after insert: " + persister.GetInfoString(), insertSQL.Text); } }
public void OnLoad(IBinder Binder) { Binder.BindSingleton <HotkeyActionRegisterer>(); Binder.Bind <IIconSet, MaterialDesignIcons>(); // Singleton View Models Binder.BindSingleton <MainViewModel>(); Binder.BindSingleton <VideoViewModel>(); Binder.BindSingleton <ProxySettingsViewModel>(); Binder.BindSingleton <LicensesViewModel>(); Binder.BindSingleton <CrashLogsViewModel>(); Binder.BindSingleton <FFmpegCodecsViewModel>(); Binder.BindSingleton <ScreenShotViewModel>(); Binder.BindSingleton <RecentViewModel>(); Binder.BindSingleton <RecordingViewModel>(); Binder.BindSingleton <FileNameFormatViewModel>(); Binder.Bind <IRecentList>(ServiceProvider.Get <RecentViewModel>); Binder.BindSingleton <CustomOverlaysViewModel>(); Binder.BindSingleton <CustomImageOverlaysViewModel>(); Binder.BindSingleton <CensorOverlaysViewModel>(); // Settings Binder.BindSingleton <Settings>(); Binder.Bind(() => ServiceProvider.Get <Settings>().Audio); Binder.Bind(() => ServiceProvider.Get <Settings>().FFmpeg); Binder.Bind(() => ServiceProvider.Get <Settings>().Gif); Binder.Bind(() => ServiceProvider.Get <Settings>().Proxy); Binder.Bind(() => ServiceProvider.Get <Settings>().Sounds); // Keymap Binder.BindSingleton <KeymapViewModel>(); // Localization Binder.Bind(() => LanguageManager.Instance); // Hotkeys Binder.BindSingleton <HotKeyManager>(); // Image Writers Binder.BindSingleton <DiskWriter>(); Binder.BindSingleton <ClipboardWriter>(); Binder.BindSingleton <ImgurWriter>(); Binder.Bind <IImageWriterItem>(ServiceProvider.Get <DiskWriter>); Binder.Bind <IImageWriterItem>(ServiceProvider.Get <ClipboardWriter>); Binder.Bind <IImageWriterItem>(ServiceProvider.Get <ImgurWriter>); // Video Writer Providers Binder.BindSingleton <FFmpegWriterProvider>(); Binder.BindSingleton <GifWriterProvider>(); Binder.BindSingleton <StreamingWriterProvider>(); Binder.BindSingleton <DiscardWriterProvider>(); Binder.BindSingleton <SharpAviWriterProvider>(); Binder.BindSingleton <FullScreenItem>(); // Video Source Providers Binder.BindSingleton <ScreenSourceProvider>(); Binder.BindSingleton <FullScreenSourceProvider>(); Binder.BindSingleton <RegionSourceProvider>(); Binder.BindSingleton <WindowSourceProvider>(); Binder.BindSingleton <DeskDuplSourceProvider>(); Binder.BindSingleton <NoVideoSourceProvider>(); // Folder Browser Dialog Binder.Bind <IDialogService, DialogService>(); // Clipboard Binder.Bind <IClipboardService, ClipboardService>(); // FFmpeg Log Binder.BindSingleton <FFmpegLog>(); // Recent Serializers Binder.Bind <IRecentItemSerializer, FileRecentSerializer>(); Binder.Bind <IRecentItemSerializer, ImgurRecentSerializer>(); // Check if Bass is available if (BassAudioSource.Available) { Binder.Bind <AudioSource, BassAudioSource>(); } else { Binder.Bind <AudioSource, NoAudioSource>(); } }
public override IBinder OnBind(Intent intent) { _binder = new ServiceTestBinder(this); return(_binder); }
public static Task AuditOrderAsync([EventHubTrigger("input-hub")] EventData message, IBinder binder, Microsoft.Extensions.Logging.ILogger logger, CancellationToken cancellationToken) { logger.LogInformation("Creating EventHub receiver"); var handler = Bus.Factory.CreateEventDataReceiver(binder, cfg => { cfg.CancellationToken = cancellationToken; cfg.SetLog(logger); cfg.InputAddress = new Uri("sb://masstransit-eventhub.servicebus.windows.net/input-hub"); cfg.UseRetry(x => x.Intervals(10, 100, 500, 1000)); cfg.Consumer(() => new AuditOrderConsumer(cfg.Log)); }); return(handler.Handle(message)); }
// This function will get triggered/executed when a new message is written // on an Azure Queue called invitations. public static void ProcessUserQueue([QueueTrigger("%queueName%")] BatchQueueItem batch, IBinder binder) { try { var mgr = new InviteManager(batch); BulkInviteResults res; var task = Task.Run(async() => { res = await mgr.BulkInvitations(batch.BulkInviteSubmissionId); }); task.Wait(); } catch (Exception ex) { Logging.WriteToAppLog(String.Format("Error processing queue '{0}'", StorageRepo.QueueName), System.Diagnostics.EventLogEntryType.Error, ex); throw; } }
private void _Join(IBinder binder) { this._Center.Join(binder); }
public ServiceBusAttributePublishTransportProvider(IBinder binder, ILog log, CancellationToken cancellationToken) { _binder = binder; _log = log; _cancellationToken = cancellationToken; }
private TypeValidator(ITypeManager typeManager, IBinder binder, IDiagnosticWriter diagnosticWriter) { this.typeManager = typeManager; this.binder = binder; this.diagnosticWriter = diagnosticWriter; }
static void BindVideoWriterProviders(IBinder Binder) { Binder.BindAsInterfaceAndClass <IVideoWriterProvider, SharpAviWriterProvider>(); Binder.BindAsInterfaceAndClass <IVideoWriterProvider, DiscardWriterProvider>(); }
public Model(IProgress <double> loadingProgress, string name, IBinder chrbnd, int modelIndex, IBinder anibnd, IBinder texbnd = null, List <string> additionalTpfNames = null, string possibleLooseTpfFolder = null, int baseDmyPolyID = 0, bool ignoreStaticTransforms = false, IBinder additionalTexbnd = null) : this() { Name = name; List <BinderFile> flverFileEntries = new List <BinderFile>(); List <TPF> tpfsUsed = new List <TPF>(); if (additionalTpfNames != null) { foreach (var t in additionalTpfNames) { if (File.Exists(t)) { tpfsUsed.Add(TPF.Read(t)); } } } FLVER2 flver = null; foreach (var f in chrbnd.Files) { var nameCheck = f.Name.ToLower(); if (flver == null && (nameCheck.EndsWith(".flver") || FLVER2.Is(f.Bytes))) { if (nameCheck.EndsWith($"_{modelIndex}.flver") || modelIndex == 0) { flver = FLVER2.Read(f.Bytes); } } else if (nameCheck.EndsWith(".tpf") || TPF.Is(f.Bytes)) { tpfsUsed.Add(TPF.Read(f.Bytes)); } else if (anibnd == null && nameCheck.EndsWith(".anibnd")) { if (nameCheck.EndsWith($"_{modelIndex}.anibnd") || modelIndex == 0) { if (BND3.Is(f.Bytes)) { anibnd = BND3.Read(f.Bytes); } else { anibnd = BND4.Read(f.Bytes); } } } } if (flver == null) { throw new ArgumentException("No FLVERs found within CHRBND."); } LoadFLVER2(flver, useSecondUV: false, baseDmyPolyID, ignoreStaticTransforms); loadingProgress.Report(1.0 / 4.0); AnimContainer = new NewAnimationContainer(this); if (anibnd != null) { LoadingTaskMan.DoLoadingTaskSynchronous($"{Name}_ANIBND", $"Loading ANIBND for {Name}...", innerProg => { AnimContainer.LoadBaseANIBND(anibnd, innerProg); }); } else { // This just messes up the model cuz they're already in // reference pose, whoops //Skeleton.ApplyBakedFlverReferencePose(); } loadingProgress.Report(2.0 / 3.0); if (tpfsUsed.Count > 0) { LoadingTaskMan.DoLoadingTaskSynchronous($"{Name}_TPFs", $"Loading TPFs for {Name}...", innerProg => { for (int i = 0; i < tpfsUsed.Count; i++) { TexturePool.AddTpf(tpfsUsed[i]); MainMesh.TextureReloadQueued = true; innerProg.Report(1.0 * i / tpfsUsed.Count); } MainMesh.TextureReloadQueued = true; }); } loadingProgress.Report(3.0 / 4.0); if (texbnd != null) { LoadingTaskMan.DoLoadingTaskSynchronous($"{Name}_TEXBND", $"Loading TEXBND for {Name}...", innerProg => { TexturePool.AddTextureBnd(texbnd, innerProg); MainMesh.TextureReloadQueued = true; }); } loadingProgress.Report(3.5 / 4.0); if (additionalTexbnd != null) { LoadingTaskMan.DoLoadingTaskSynchronous($"{Name}_AdditionalTEXBND", $"Loading extra TEXBND for {Name}...", innerProg => { TexturePool.AddTextureBnd(additionalTexbnd, innerProg); MainMesh.TextureReloadQueued = true; }); } loadingProgress.Report(3.9 / 4.0); if (possibleLooseTpfFolder != null && Directory.Exists(possibleLooseTpfFolder)) { TexturePool.AddTPFFolder(possibleLooseTpfFolder); MainMesh.TextureReloadQueued = true; } MainMesh.TextureReloadQueued = true; loadingProgress.Report(1.0); }
private void OnStructureSelectorAttaching(StructureSelectorVM context, IBinder <IContextWrapper <StructureSelectorVM> > binder) { binder.AttachChild(context, _structureSelectorV); }
public EventHubAttributeSendTransportProvider(IBinder binder, CancellationToken cancellationToken) { _binder = binder; _cancellationToken = cancellationToken; }
public static void Run([QueueTrigger(QueueName)] QueueMessage message, IBinder binder) { TaskSource.TrySetResult(binder.Bind <string>(new QueueTriggerAttribute(QueueName))); }
void IServiceConnection.OnServiceConnected(ComponentName name, IBinder binder) { _observer.OnNext((TBinder)binder); }
public override IBinder OnBind(Intent intent) { binder = new TimerBackgroundingServiceBinder(this); return(binder); }
public async Task <IActionResult> OrderFulfillment([HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req, ILogger log, IBinder binder) { return(await ValidateAndRouteMessage(req, "orderfulfillment", binder, log)); }
public TypeAssignmentVisitor(IResourceTypeProvider resourceTypeProvider, TypeManager typeManager, IBinder binder) { this.resourceTypeProvider = resourceTypeProvider; this.typeManager = typeManager; this.binder = binder; this.assignedTypes = new Dictionary <SyntaxBase, TypeAssignment>(); }