Ejemplo n.º 1
0
        public static PlatformServiceJobBase GetJob(string jobId, string instanceId, AzureBasedApplicationBase azureApplication, PlatformServiceSampleJobConfiguration jobConfig)
        {
            PlatformServiceJobBase returnJob = null;

            switch (jobConfig.JobType)
            {
            case JobType.GetAnonToken:
            {
                if (jobConfig.AnonTokenJobInput == null)
                {
                    Logger.Instance.Error("[PlatformServiceClientJobHelper] NULL for GetAnonTokenJob when job type is JobType.ImBridge!");
                    return(null);
                }
                returnJob = new GetAnonTokenJob(jobId, instanceId, azureApplication, jobConfig.AnonTokenJobInput);
                break;
            }

            case JobType.AdhocMeeting:
            {
                if (jobConfig.GetAdhocMeetingResourceInput == null)
                {
                    Logger.Instance.Error("[PlatformServiceClientJobHelper] NULL for GetAdhocMeetingResourceInput when job type is JobType.AdhocMeeting!");
                    return(null);
                }
                returnJob = new GetAdhocMeetingResouceJob(jobId, instanceId, azureApplication, jobConfig.GetAdhocMeetingResourceInput);
                break;
            }

            default:
                break;
            }
            return(returnJob);
        }
Ejemplo n.º 2
0
 public PlatformServiceJobBase(string jobId, string instanceId, AzureBasedApplicationBase azureApplication, PlatformServiceJobInputBase input, JobType jobType)
 {
     JobId            = jobId;
     InstanceId       = instanceId;
     JobInput         = input;
     JobType          = jobType;
     AzureApplication = azureApplication;
     LoggingContext   = new LoggingContext(JobId, InstanceId);
 }
 public InstantMessagingBridgeJob(string jobid, string instanceid, AzureBasedApplicationBase azureApplication, InstantMessagingBridgeJobInput input)
     : base(jobid, instanceid, azureApplication, input, JobType.InstantMessagingBridge)
 {
     m_handleIncomingMessageInput = base.JobInput as InstantMessagingBridgeJobInput;
     if (m_handleIncomingMessageInput == null)
     {
         throw new ArgumentNullException("Failed to get job input as InstantMessagingBridgeJobInput!");
     }
 }
Ejemplo n.º 4
0
        public HuntGroupJob(string jobid, string instanceid, AzureBasedApplicationBase azureApplication, HuntGroupJobInput input)
            : base(jobid, instanceid, azureApplication, input, JobType.HuntGroup)
        {
            m_jobInput = input;
            if (m_jobInput == null)
            {
                throw new ArgumentNullException("Failed to get job input as HuntGroupJobInput!");
            }

            m_toneReceived = new TaskCompletionSource <string>();
        }
 public GetAnonTokenJob(string jobId, string instanceId, AzureBasedApplicationBase azureApplication, GetAnonTokenInput input)
     : base(jobId, instanceId, azureApplication, input, JobType.GetAnonToken)
 {
 }
 /// <summary>
 /// Creates an instance of <see cref="PlatformServiceListeningJobBase"/>.
 /// </summary>
 /// <param name="jobId">Unique ID of this job, it distinguishes the job from other jobs.</param>
 /// <param name="instanceId">ID of the service/process/webapp hosting all the jobs.</param>
 /// <param name="input"><see cref="PlatformServiceListeningJobBase"/> providing configuration for the job.</param>
 /// <param name="jobType"><see cref="JobType"/> specifying the type of this job.</param>
 public PlatformServiceListeningJobBase(string jobId, string instanceId, AzureBasedApplicationBase azureApplication, PlatformServiceJobInputBase input, JobType jobType)
     : base(jobId, instanceId, azureApplication, input, jobType)
 {
 }
Ejemplo n.º 7
0
 public SimpleNotifyJob(string jobId, string instanceId, AzureBasedApplicationBase azureApplication, SimpleNotifyJobInput input)
     : base(jobId, instanceId, azureApplication, input, JobType.SimpleNotification)
 {
     m_responseMessageNotified = new TaskCompletionSource<string>();
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Constructs instances of <see cref="AudioVideoIVRJob"/>.
 /// </summary>
 /// <param name="jobId">Unique ID of this job, it distinguishes the job from other jobs.</param>
 /// <param name="instanceId">ID of the service/process/webapp hosting all the jobs.</param>
 /// <param name="input"><see cref="AudioVideoIVRJobInput"/> providing configuration for the job.</param>
 public AudioVideoIVRJob(string jobId, string instanceId, AzureBasedApplicationBase azureApplication, AudioVideoIVRJobInput input)
     : base(jobId, instanceId, azureApplication, input, JobType.AudioVideoIVR)
 {
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Create instance of <see cref="AudioVideoIVRPromptHandler"/>.
 /// </summary>
 /// <param name="input"><see cref="AudioVideoIVRJobInput"/> providing configuration for the job</param>
 /// <param name="loggingContext"><see cref="LoggingContext"/> to be used for all log statements</param>
 internal AudioVideoIVRPromptHandler(AudioVideoIVRJobInput input, AzureBasedApplicationBase azureApplication, LoggingContext loggingContext)
 {
     currentMenu           = input;
     this.azureApplication = azureApplication;
     this.loggingContext   = loggingContext;
 }