protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // The messaging service can also be initialized in your main activity. // We have initialized the messaging service inside MainApplication though instead. // See MainApplication for more details. //MessagingService.Init(this); SetContentView(Resource.Layout.activity_main); _actionSheetButton = FindViewById <Button>(Resource.Id.action_sheet_button); _actionSheetBottomButton = FindViewById <Button>(Resource.Id.action_sheet_bottom_button); _alertButton = FindViewById <Button>(Resource.Id.alert_button); _confirmButton = FindViewById <Button>(Resource.Id.confirm_button); _deleteButton = FindViewById <Button>(Resource.Id.delete_button); _loadingButton = FindViewById <Button>(Resource.Id.loading_button); _loginButton = FindViewById <Button>(Resource.Id.login_button); _promptButton = FindViewById <Button>(Resource.Id.prompt_button); _snackbarButton = FindViewById <Button>(Resource.Id.snackbar_button); _toastButton = FindViewById <Button>(Resource.Id.toast_button); // Choose which method set to test. _messaging = new SyncMessaging(); //_messaging = new AsyncMessaging(); }
// GET: Account public AccountController(IUnitOfWork unitOfWork, [Dependency("MD5")] IEncryptor encryptor, IMessaging messaging) : base(unitOfWork) { _encryptor = encryptor; _messaging = messaging; }
internal CalculateComponentGuids(IMessaging messaging, IBackendHelper helper, IPathResolver pathResolver, IntermediateSection section) { this.Messaging = messaging; this.BackendHelper = helper; this.PathResolver = pathResolver; this.Section = section; }
public void Init(string mainPatchName, int numberOfTicks, IMessaging messaging) { this.mainPatchName = "pd-" + mainPatchName; pureDataIds = new List <int>(); this.numberOfTicks = numberOfTicks; this.messaging = messaging; }
/// <summary> /// Instantiate a new WixVariableResolver. /// </summary> public WixVariableResolver(IMessaging messaging) { this.locVariables = new Dictionary <string, BindVariable>(); this.wixVariables = new Dictionary <string, BindVariable>(); this.Codepage = -1; this.Messaging = messaging; }
public JsonAmqpRpcServer(string hostName, string queueName, IJsonRpcHandler handler) { _log = LogManager.GetCurrentClassLogger(); _log.Info("AMQP RPC server starting: host = {0}; queue = {1}", hostName, queueName); _messaging = AmqpRpc.CreateMessaging(AmqpRpc.CreateConnector(hostName), queueName); _handler = handler; }
/// <summary> /// Get an integer attribute value and displays an error for an illegal integer value. /// </summary> /// <param name="sourceLineNumbers">Source line information about the owner element.</param> /// <param name="attribute">The attribute containing the value to get.</param> /// <param name="minimum">The minimum legal value.</param> /// <param name="maximum">The maximum legal value.</param> /// <param name="messageHandler">A delegate that receives error messages.</param> /// <returns>The attribute's integer value or a special value if an error occurred during conversion.</returns> public static int GetAttributeIntegerValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute, int minimum, int maximum) { Debug.Assert(minimum > CompilerConstants.IntegerNotSet && minimum > CompilerConstants.IllegalInteger, "The legal values for this attribute collide with at least one sentinel used during parsing."); string value = Common.GetAttributeValue(messaging, sourceLineNumbers, attribute, EmptyRule.CanBeWhitespaceOnly); int integer = CompilerConstants.IllegalInteger; if (0 < value.Length) { if (Int32.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture.NumberFormat, out integer)) { if (CompilerConstants.IntegerNotSet == integer || CompilerConstants.IllegalInteger == integer) { messaging.Write(ErrorMessages.IntegralValueSentinelCollision(sourceLineNumbers, integer)); } else if (minimum > integer || maximum < integer) { messaging.Write(ErrorMessages.IntegralValueOutOfRange(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, integer, minimum, maximum)); integer = CompilerConstants.IllegalInteger; } } else { messaging.Write(ErrorMessages.IllegalIntegerValue(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); } } return(integer); }
public ProcessDependencyProvidersCommand(IMessaging messaging, IntermediateSection section, IDictionary <string, PackageFacade> facades) { this.Messaging = messaging; this.Section = section; this.Facades = facades; }
/// <summary> /// Get an identifier attribute value and displays an error for an illegal identifier value. /// </summary> /// <param name="sourceLineNumbers">Source line information about the owner element.</param> /// <param name="attribute">The attribute containing the value to get.</param> /// <param name="messageHandler">A delegate that receives error messages.</param> /// <returns>The attribute's identifier value or a special value if an error occurred.</returns> internal static string GetAttributeIdentifierValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute) { string value = Common.GetAttributeValue(messaging, sourceLineNumbers, attribute, EmptyRule.CanBeWhitespaceOnly); if (Common.IsIdentifier(value)) { if (72 < value.Length) { messaging.Write(WarningMessages.IdentifierTooLong(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); } return(value); } else { if (value.StartsWith("[", StringComparison.Ordinal) && value.EndsWith("]", StringComparison.Ordinal)) { messaging.Write(ErrorMessages.IllegalIdentifierLooksLikeFormatted(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); } else { messaging.Write(ErrorMessages.IllegalIdentifier(sourceLineNumbers, attribute.Parent.Name.LocalName, attribute.Name.LocalName, value)); } return(String.Empty); } }
public GetFileFacadesFromTransforms(IMessaging messaging, IWindowsInstallerBackendHelper backendHelper, FileSystemManager fileSystemManager, IEnumerable <SubStorage> subStorages) { this.Messaging = messaging; this.BackendHelper = backendHelper; this.FileSystemManager = fileSystemManager; this.SubStorages = subStorages; }
public SequenceActionsCommand(IMessaging messaging, IntermediateSection section) { this.Messaging = messaging; this.Section = section; this.RelativeActionsForActions = new Dictionary <string, RelativeActions>(); }
public EventSubscriber(IMetrics metrics, IMessaging messaging, IEventStoreConsumer consumer, int concurrency) { _metrics = metrics; _messaging = messaging; _consumer = consumer; _concurrency = concurrency; }
public ResolveReferencesCommand(IMessaging messaging, IntermediateSection entrySection, IDictionary <string, SymbolWithSection> symbolsWithSections) { this.Messaging = messaging; this.entrySection = entrySection; this.symbolsWithSections = symbolsWithSections; this.BuildingMergeModule = (SectionType.Module == entrySection.Type); }
/// <summary> /// Adds a list of items to the 'after' ordering collection. /// </summary> /// <param name="items">List of items to add.</param> /// <param name="messageHandler">Message handler in case a circular ordering reference is found.</param> public void AddAfter(ItemCollection items, IMessaging messageHandler) { foreach (Item item in items) { this.AddAfter(item, messageHandler); } }
/// <summary> /// Flattens the ordering dependency for this item. /// </summary> /// <param name="messageHandler">Message handler in case a circular ordering reference is found.</param> public void FlattenAfters(IMessaging messageHandler) { if (this.flattenedAfterItems) { return; } this.flattenedAfterItems = true; // Ensure that if we're after something (A), and *it's* after something (B), // that we list ourselved as after both (A) *and* (B). ItemCollection nestedAfterItems = new ItemCollection(); foreach (Item afterItem in this.afterItems) { afterItem.FlattenAfters(messageHandler); nestedAfterItems.Add(afterItem.afterItems); if (afterItem.ShouldItemPropagateChildOrdering()) { // If we are after a group, it really means // we are after all of the group's children. foreach (Item childItem in afterItem.ChildItems) { childItem.FlattenAfters(messageHandler); nestedAfterItems.Add(childItem.afterItems); nestedAfterItems.Add(childItem); } } } this.AddAfter(nestedAfterItems, messageHandler); }
/// <summary> /// Constructs a message sending application. /// </summary> public ClientSendingMessages() { session = Diffusion.Sessions.Principal("client").Password("password") .Open("ws://diffusion.example.com:80"); messaging = session.GetMessagingFeature(); }
/// <summary> /// Instantiate a new Validator. /// </summary> public Validator(IMessaging messaging) { this.cubeFiles = new StringCollection(); this.extension = new ValidatorExtension(messaging); this.validationUIHandler = new InstallUIHandler(this.ValidationUIHandler); this.messaging = messaging; }
/// <summary> /// Constructs a message sending application. /// </summary> public ClientSendingMessages() { session = Diffusion.Sessions.Principal( "client" ).Password( "password" ) .Open( "ws://diffusion.example.com:80" ); messaging = session.GetMessagingFeature(); }
public TransferFilesCommand(IMessaging messaging, IEnumerable <ILayoutExtension> extensions, IEnumerable <IFileTransfer> fileTransfers, bool resetAcls) { this.Extensions = extensions; this.Messaging = messaging; this.FileTransfers = fileTransfers; this.ResetAcls = resetAcls; }
public void Execute() { this.Messaging = this.ServiceProvider.GetService <IMessaging>(); var extensionManager = this.ServiceProvider.GetService <IExtensionManager>(); var context = this.ServiceProvider.GetService <ILayoutContext>(); context.Messaging = this.Messaging; context.Extensions = extensionManager.Create <ILayoutExtension>(); context.FileTransfers = this.FileTransfers; context.ContentFilePaths = this.ContentFilePaths; context.ContentsFile = this.ContentsFile; context.OutputPdbPath = this.OutputsFile; context.BuiltOutputsFile = this.BuiltOutputsFile; context.SuppressAclReset = this.SuppressAclReset; // Pre-layout. // foreach (var extension in context.Extensions) { extension.PreLayout(context); } try { // Final step in binding that transfers (moves/copies) all files generated into the appropriate // location in the source image. if (context.FileTransfers?.Any() == true) { this.Messaging.Write(VerboseMessages.LayingOutMedia()); var command = new TransferFilesCommand(context.Messaging, context.Extensions, context.FileTransfers, context.SuppressAclReset); command.Execute(); } } finally { if (!String.IsNullOrEmpty(context.ContentsFile) && context.ContentFilePaths != null) { this.CreateContentsFile(context.ContentsFile, context.ContentFilePaths); } if (!String.IsNullOrEmpty(context.OutputsFile) && context.FileTransfers != null) { this.CreateOutputsFile(context.OutputsFile, context.FileTransfers, context.OutputPdbPath); } if (!String.IsNullOrEmpty(context.BuiltOutputsFile) && context.FileTransfers != null) { this.CreateBuiltOutputsFile(context.BuiltOutputsFile, context.FileTransfers, context.OutputPdbPath); } } // Post-layout. foreach (var extension in context.Extensions) { extension.PostLayout(); } }
public ResolveDownloadUrlsCommand(IMessaging messaging, IEnumerable <IBurnBackendBinderExtension> backendExtensions, IEnumerable <WixBundleContainerSymbol> containers, Dictionary <string, WixBundlePayloadSymbol> payloadsById) { this.Messaging = messaging; this.BackendExtensions = backendExtensions; this.Containers = containers; this.PayloadsById = payloadsById; }
public void InitInterfaces(IMessaging messaging, IFigureOnBoard figureOnBoard, IFEN fen, IChessMatchCurrentState chessMatchCurrentState) { Messaging = messaging; FigureOnBoard = figureOnBoard; FEN = fen; ChessMatchCurrentState = chessMatchCurrentState; }
public TransferFilesCommand(IMessaging messaging, IEnumerable <ILayoutExtension> extensions, IEnumerable <FileTransfer> fileTransfers, bool suppressAclReset) { this.FileSystem = new FileSystem(extensions); this.Messaging = messaging; this.FileTransfers = fileTransfers; this.SuppressAclReset = suppressAclReset; }
void SendMessage(MessageInfo mi, Inbox inbox, NativeActivityContext context) { if (mi == null) { return; } var process = Process.GetProcessFromContext(context); IMessaging messaging = context.GetExtension <IMessaging>(); var qm = messaging.CreateQueuedMessage(); qm.Template = mi.Template; qm.Key = mi.Key; qm.TargetId = mi.TargetId; qm.Immediately = mi.Immediately; qm.Source = $"Inbox:{inbox.Id}"; qm.Environment.Add("InboxId", inbox.Id); qm.Environment.Add("ProcessId", process.Id); qm.Parameters.Append(mi.Parameters, replaceExisiting: true); Int64 msgId = messaging.QueueMessage(qm); context.TrackRecord($"Message queued successfully {{Id: {msgId}}}"); }
public OrderPackagesAndRollbackBoundariesCommand(IMessaging messaging, IEnumerable <WixGroupSymbol> groupSymbols, Dictionary <string, WixBundleRollbackBoundarySymbol> boundarySymbols, IDictionary <string, PackageFacade> packageFacades) { this.Messaging = messaging; this.GroupSymbols = groupSymbols; this.Boundaries = boundarySymbols; this.PackageFacades = packageFacades; }
/// <summary> /// Parse a localization string into a WixVariableRow. /// </summary> /// <param name="node">Element to parse.</param> private static void ParseString(IMessaging messaging, XElement node, IDictionary <string, BindVariable> variables) { string id = null; bool overridable = false; SourceLineNumber sourceLineNumbers = SourceLineNumber.CreateFromXObject(node); foreach (XAttribute attrib in node.Attributes()) { if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || Localizer.WxlNamespace == attrib.Name.Namespace) { switch (attrib.Name.LocalName) { case "Id": id = Common.GetAttributeIdentifierValue(messaging, sourceLineNumbers, attrib); break; case "Overridable": overridable = YesNoType.Yes == Common.GetAttributeYesNoValue(messaging, sourceLineNumbers, attrib); break; case "Localizable": ; // do nothing break; default: messaging.Write(ErrorMessages.UnexpectedAttribute(sourceLineNumbers, attrib.Parent.Name.ToString(), attrib.Name.ToString())); break; } } else { messaging.Write(ErrorMessages.UnsupportedExtensionAttribute(sourceLineNumbers, attrib.Parent.Name.ToString(), attrib.Name.ToString())); } } string value = Common.GetInnerText(node); if (null == id) { messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, "String", "Id")); } else if (0 == id.Length) { messaging.Write(ErrorMessages.IllegalIdentifier(sourceLineNumbers, "String", "Id", 0)); } if (!messaging.EncounteredError) { var variable = new BindVariable { SourceLineNumbers = sourceLineNumbers, Id = id, Overridable = overridable, Value = value, }; Localizer.AddWixVariable(messaging, variables, variable); } }
private const int DefaultMaximumUncompressedMediaSize = 200; // Default value is 200 MB public AssignMediaCommand(IntermediateSection section, IMessaging messaging, IEnumerable <FileFacade> fileFacades, bool compressed) { this.CabinetNameTemplate = "Cab{0}.cab"; this.Section = section; this.Messaging = messaging; this.FileFacades = fileFacades; this.FilesCompressed = compressed; }
public CreateIdtFileCommand(IMessaging messaging, Table table, int codepage, string intermediateFolder, bool keepAddedColumns) { this.Messaging = messaging; this.Table = table; this.Codepage = codepage; this.IntermediateFolder = intermediateFolder; this.KeepAddedColumns = keepAddedColumns; }
public DelegatingConsumer(IMessaging <T> messaging, IEnumerable <IMessageHandler <T> > messageHandlers, ILogger <DelegatingConsumer <T> > log) { this.messaging = messaging; this.messageHandlers = messageHandlers; this.log = log; }
public ProcessMspPackageCommand(IMessaging messaging, IntermediateSection section, PackageFacade facade, Dictionary <string, WixBundlePayloadSymbol> payloadSymbols) { this.Messaging = messaging; this.AuthoredPayloads = payloadSymbols; this.Section = section; this.Facade = facade; }
public CreateApplicationReviewCommandHandler(IVacancyRepository vacancyRepository, IApplicationReviewRepository applicationReviewRepository, ILogger <CreateApplicationReviewCommandHandler> logger, ITimeProvider timeProvider, IMessaging messaging) { _logger = logger; _vacancyRepository = vacancyRepository; _applicationReviewRepository = applicationReviewRepository; _timeProvider = timeProvider; _messaging = messaging; }
public JsonAmqpRpcClient(string hostName, string target) { _target = target; var connector = AmqpRpc.CreateConnector(hostName); _messaging = Factory.CreateMessaging(); _messaging.Connector = connector; _messaging.SetupReceiver += channel => { _replyTo = channel.QueueDeclare(); _messaging.QueueName = _replyTo; }; _messaging.QueueName = "DUMMY_QUEUE_NAME"; _messaging.Init(); }
public HistoryViewModel(SampleDbConnection conn, IGeofenceManager geofences, IUserDialogs dialogs, IMessaging messaging) { this.conn = conn; this.geofences = geofences; this.Reload = new Command(this.Load); this.Clear = ReactiveCommand.CreateAsyncTask(async x => { var result = await dialogs.ConfirmAsync(new ConfirmConfig() .UseYesNo() .SetMessage("Are you sure you want to delete all of your history?")); if (result) { this.conn.DeleteAll<GeofenceEvent>(); this.Load(); } }); this.SendDatabase = new Command(() => { var backupLocation = conn.CreateDatabaseBackup(conn.Platform); var mail = new EmailMessageBuilder() .Subject("Geofence Database") //.WithAttachment(conn.DatabasePath, "application/octet-stream") .WithAttachment(backupLocation, "application/octet-stream") .Body("--") .Build(); messaging.EmailMessenger.SendEmail(mail); }); }
public void Initialize() { var logger = new Mock<ILogger>(); _m = new Messaging(logger.Object); }
public FubuRegistryChooser(IFubuRegistryFinder finder, IMessaging messaging) { _finder = finder; _messaging = messaging; }
public MessagesController(IMessaging messaging) { _messaging = messaging; }