/// <summary>
        /// Sets the address.
        /// </summary>
        /// <param name="details">The details.</param>
        public string SetAddress(IProviderDetails details)
        {
            if (It.IsNull(details))
            {
                return(null);
            }

            It.IsOutOfRange(details.UKPRN, Source.ID)
            .AsGuard <ArgumentException>(nameof(details.UKPRN));

            // cleanse the input, remove missing bit's so it displays ok.
            var temp = $"{details.Name}#{details.Location}#{details.Street}#{details.Town}#{details.Postcode}";

            return(string.Join(",\r\n", temp.Split(new char[] { '#' }, StringSplitOptions.RemoveEmptyEntries)));
        }
Beispiel #2
0
        /// <summary>
        /// Runs...
        /// </summary>
        /// <param name="script">The script.</param>
        /// <param name="inContext">in context.</param>
        /// <param name="forCandidate">for candidate.</param>
        public void RunScript(ISQLBatchScript script, IConnectionDetail inContext, int forProvider, ref string forCandidate)
        {
            var result = Task.Run(async() =>
            {
                It.IsOutOfRange(script.Type, TypeOfBatchScript.File)
                .AsGuard <ArgumentException>($"{script.Type}");

                Emitter.Publish(Localised.PerformingExportScript, script.Description);

                var commandPath = Path.Combine(Location.OfAssets, script.Command);
                var command     = await FileManager.Load(commandPath);
                command         = Token.DoSecondaryPass(command, forProvider);

                return(Context.GetAtom <string>(command, inContext));
            }).Result;

            forCandidate = forCandidate.Replace(script.Description, result);

            Emitter.Publish(Indentation.FirstLevel, CommonLocalised.Completed);
        }
 /// <summary>
 /// Determines whether [has disqualifying monitor] [this monitor].
 /// </summary>
 /// <param name="thisMonitor">The this monitor.</param>
 /// <returns>
 ///   <c>true</c> if [has disqualifying monitor] [this monitor]; otherwise, <c>false</c>.
 /// </returns>
 public bool HasDisqualifyingMonitor(IEmploymentStatusMonitoring thisMonitor) =>
 It.IsInRange(thisMonitor.ESMType, Monitoring.EmploymentStatus.Types.EmploymentIntensityIndicator) &&
 It.IsOutOfRange($"{thisMonitor.ESMType}{thisMonitor.ESMCode}", Monitoring.EmploymentStatus.EmployedForLessThan16HoursPW);
 /// <summary>
 /// Determines whether [is invalid domain item] [the specified monitor].
 /// </summary>
 /// <param name="monitor">The monitor.</param>
 /// <returns>
 ///   <c>true</c> if [is invalid domain item] [the specified monitor]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsInvalidDomainItem(IEmploymentStatusMonitoring monitor) =>
 It.IsOutOfRange($"{monitor.ESMType}{monitor.ESMCode}", Monitoring.EmploymentStatus.AsASet);
 /// <summary>
 /// Determines whether [has a qualifying monitor status] [the specified monitor].
 /// </summary>
 /// <param name="monitor">The monitor.</param>
 /// <returns>
 ///   <c>true</c> if [has a qualifying monitor status] [the specified monitor]; otherwise, <c>false</c>.
 /// </returns>
 public bool HasADisqualifyingMonitorStatus(IEmploymentStatusMonitoring monitor) =>
 monitor.ESMType.ComparesWith(Monitoring.EmploymentStatus.Types.EmploymentIntensityIndicator) &&
 It.IsOutOfRange(
     $"{monitor.ESMType}{monitor.ESMCode}",
     Monitoring.EmploymentStatus.EmployedFor0To10HourPW,
     Monitoring.EmploymentStatus.EmployedFor11To20HoursPW);
Beispiel #6
0
 /// <summary>
 /// Determines whether [has qualifying employment status] [the specified employment status].
 /// </summary>
 /// <param name="eStatus">The e status.</param>
 /// <returns>
 ///   <c>true</c> if [has qualifying employment status] [the specified employment status]; otherwise, <c>false</c>.
 /// </returns>
 public bool HasQualifyingEmploymentStatus(ILearnerEmploymentStatus eStatus) =>
 It.IsOutOfRange(eStatus?.EmpStat, TypeOfEmploymentStatus.NotKnownProvided);
Beispiel #7
0
 /// <summary>
 /// Determines whether [has a qualifying employment status] [the specified this employment].
 /// </summary>
 /// <param name="thisEmployment">The this employment.</param>
 /// <returns>
 ///   <c>true</c> if [has a qualifying employment status] [the specified this employment]; otherwise, <c>false</c>.
 /// </returns>
 public bool HasAQualifyingEmploymentStatus(ILearnerEmploymentStatus thisEmployment) =>
 It.IsOutOfRange(thisEmployment?.EmpStat, TypeOfEmploymentStatus.NotKnownProvided);
Beispiel #8
0
 /// <summary>
 /// Determines whether [is qualifying notional NVQ] [the specified delivery].
 /// </summary>
 /// <param name="delivery">The delivery.</param>
 /// <returns>
 ///   <c>true</c> if [is qualifying notional NVQ] [the specified delivery]; otherwise, <c>false</c>.
 /// </returns>
 public bool IsQualifyingNotionalNVQ(ILARSLearningDelivery delivery) =>
 It.IsOutOfRange(delivery?.NotionalNVQLevelv2, LARSNotionalNVQLevelV2.Level4);