/// <summary> /// Gets the destination Id for the specified source. /// </summary> /// <param name="source">The source should be handled by the destination.</param> /// <returns>The Id if the destination is found; otherwise, null.</returns> public string GetDestinationId(string source) { ValidationUtils.ArgumentNotNullOrEmpty(source, "source"); string destinationId = GetDestinationBySource(source); if (destinationId != null) { return(destinationId); } //Search for a RemotingService Destination defaultDestination = null; foreach (DictionaryEntry entry in _services) { IService serviceTmp = entry.Value as IService; if (serviceTmp.IsSupportedMessageType("flex.messaging.messages.RemotingMessage")) { Destination[] destinations = serviceTmp.GetDestinations(); foreach (Destination destination in destinations) { if (destination.Source == source) { return(destination.Id); } if (destination.Source == "*") { defaultDestination = destination; } } } } if (defaultDestination != null) { return(defaultDestination.Id); } return(null); }
public string GetDestinationId(string source) { ValidationUtils.ArgumentNotNullOrEmpty(source, "source"); string destinationBySource = this.GetDestinationBySource(source); if (destinationBySource != null) { return(destinationBySource); } Destination destination = null; foreach (DictionaryEntry entry in this._services) { IService service = entry.Value as IService; if (service.IsSupportedMessageType("flex.messaging.messages.RemotingMessage")) { Destination[] destinations = service.GetDestinations(); foreach (Destination destination2 in destinations) { if (destination2.Source == source) { return(destination2.Id); } if (destination2.Source == "*") { destination = destination2; } } } } if (destination != null) { return(destination.Id); } return(null); }
/// <summary> /// Initializes a new instance of the <see cref="JConstructor"/> class with the specified name. /// </summary> /// <param name="name">The constructor name.</param> public JConstructor(string name) { ValidationUtils.ArgumentNotNullOrEmpty(name, "name"); _name = name; }
public JProperty(string name) { ValidationUtils.ArgumentNotNullOrEmpty(name, "name"); _name = name; }
public string GetValue(string key) { ValidationUtils.ArgumentNotNullOrEmpty(key, nameof(key)); return(ConfigurationManager.AppSettings[key]); }