/// <summary>
 /// Constructor
 /// </summary>
 protected RemotePortForwardingReply(bool accepted, ISSHChannelEventHandler eventHandler, Reason reasonCode, string reasonMessage)
 {
     this.Accepted = accepted;
     this.EventHandler = eventHandler;
     this.ReasonCode = reasonCode;
     this.ReasonMessage = reasonMessage;
 }
    public FollowAction(GameObject actor, GameObject targetCharacter, float maximumDistance, float minimumDistance, Reason reason, bool canStartDialogueWithAgents)
        : base(actor)
    {
        InitInteractionInfo(true, canStartDialogueWithAgents);

        this.targetCharacter = targetCharacter;
        this.targetCharacterState = (CharacterState)targetCharacter.GetComponent("CharacterState");
        this.maximumDistance = maximumDistance;
        this.minimumDistance = minimumDistance;
        this.reason = reason;
        switch(reason) {
            case Reason.SEX:
                targetCharacterState.SetTask(CharacterState.Task.SEX, actor);
                TaskHelp.ShowHelp(TaskHelp.SEX, actor);
                break;
            case Reason.DANCE:
                targetCharacterState.SetTask(CharacterState.Task.DANCE, actor);
                TaskHelp.ShowHelp(TaskHelp.DANCE, null);
                break;
            case Reason.POKER_WITHOUT_MONEY:
                targetCharacterState.SetTask(CharacterState.Task.POKER, actor);
                TaskHelp.ShowHelp(TaskHelp.POKER, null);
                break;
            case Reason.POKER_WITH_MONEY:
                targetCharacterState.SetTask(CharacterState.Task.POKER, actor);
                TaskHelp.ShowHelp(TaskHelp.POKER, null);
                break;
            case Reason.DRINK:
                targetCharacterState.SetTask(CharacterState.Task.DRINK, actor);
                TaskHelp.ShowHelp(TaskHelp.DRINK, actor);
                break;
        }
        ending = false;
    }
 ///
 /// This constructor implies that a generic error occurred, and is
 /// the reason the track is finished. An exception is attached.
 ///
 public TrackFinishedInfo( uint trackKey, 
                         Exception e,
                         Reason why )
 {
     _key = trackKey;
      _reason = why;
      _whatWentWrong = e;
 }
        public static string GetMessage(Reason reason)
        {
            switch (reason)
            {
                case Reason.InvalidXML:
                    return "Invalid XML supplied.";
            }

            return "Unknown creation error.";
        }
        protected static string GetMessage(Reason reason)
        {
            switch (reason)
            {
                case Reason.MissingParameter:
                    return " is missing a required parameter.";

                case Reason.InvalidParameterType:
                    return " has a parameter of an invalid type.";

            }

            return " failed for an unknown reason.";
        }
Exemple #6
0
        private int GetAbsenceValuesInSingleMonth(IEnumerable<EmployeeViewModel> employees, Reason reason, int? _month,
            int? _year, int? _projectId)
        {
            var year = _year ?? DateTime.Now.Year;
            var month = _month ?? DateTime.Now.Month;
            var projectId = _projectId;

            return
                employees.Sum(
                    employee =>
                        employee.AbsenceList.Count(
                            x =>
                                x.Reason.Equals(reason) && x.Month == month && x.Year == year &&
                                (projectId == null || x.ProjectId == projectId)));
        }
Exemple #7
0
        private IEnumerable<int> GetTotalAbsenceValues(StatisticsRequest request, Reason reason)
        {
            var employees = request.ProjectId == null
                ? employeeService.GetAllViewModels()
                : projectService.GetSingle((int) request.ProjectId).CurrentEmployees;

            var totalList = new List<int>();

            for (var currentMonth = request.StartMonth; currentMonth < request.EndMonth + 1; currentMonth++)
            {
                totalList.Add(GetAbsenceValuesInSingleMonth(employees, reason, currentMonth, request.Year,
                    request.ProjectId));
            }
            return totalList;
        }
        public static string GetMessage(Reason reason)
        {
            switch (reason)
            {
                case Reason.InvalidXMLFormat:
                    return "XML does not appear to be a valid OverlaySetting format.";

                case Reason.VariableProcessing:
                    return "Variable processing failed.";

                case Reason.OverlayCreation:
                    return "Overlay creation failed.";
            }

            return "Unknown reason.";
        }
        private static string GetMessage(Reason reason)
        {
            switch (reason)
            {
                case Reason.NetworkError:
                    return "Network encountered an error.";

                case Reason.ReadTimeout:
                    return "An authentication read timed out.";

                case Reason.InvalidAuthentication:
                    return "Invalid authentication received.";
            }

            return "Unknown error.";
        }
        private static string GetMessage(Reason reason)
        {
            switch (reason)
            {
                case Reason.InvalidXML:
                    return "Invalid XML supplied.";

                case Reason.DuplicateVariable:
                    return "Two or more variables with same name.";

                case Reason.NullVariable:
                    return "One or more variables with no name.";
            }

            return "Unknown parse error.";
        }
Exemple #11
0
 public Drive(string relativePath, Reason reason)
 {
     var directory = Path.Combine(GetDriveRoot(), relativePath);
     if (!Directory.Exists(directory) && reason == Reason.Read)
     {
         throw new TestDriveException("no such directory: " + directory);
     }
     else if (Directory.Exists(directory) && reason == Reason.Save)
     {
         throw new TestDriveException("Attempting to open an existing directory: " + directory);
     }
     else if (!Directory.Exists(directory) && reason == Reason.Save)
     {
         Directory.CreateDirectory(directory);
     }
     _reason = reason;
     _directory = directory;
 }
        protected static string GetMessage(Reason reason)
        {
            switch (reason)
            {
                case Reason.FormatIncorrect:
                    return " is in an invalid format.";

                case Reason.Overflow:
                    return " is too large to be parsed.";

                case Reason.NotSpecified:
                    return " was not assigned a value.";

                case Reason.InvalidValue:
                    return " has an invalid value.";
            }

            return " is invalid for an unknown reason.";
        }
        public RecommendedVenues(Dictionary<string, object> jsonDictionary)
            : base(jsonDictionary)
        {
            Places = new Dictionary<string, List<Recommends>>();
            Warning = "";
            Keywords = new Dictionary<string, string>();
            jsonDictionary = Helpers.ExtractDictionary(jsonDictionary, "response");
            foreach (var obj in (object[]) ((Dictionary<string, object>) jsonDictionary["keywords"])["items"])
                Keywords.Add(((Dictionary<string, object>) obj)["displayName"].ToString(),
                             ((Dictionary<string, object>) obj)["keyword"].ToString());
            if (jsonDictionary.ContainsKey("warning"))
                Warning = ((Dictionary<string, object>) jsonDictionary["warning"])["text"].ToString();
            foreach (var groupObj in ((object[])jsonDictionary["groups"]))
            {
                var type = ((Dictionary<string, object>)groupObj)["type"].ToString();
                var recs = new List<Recommends>();
                foreach (var itemObj in (object[])((Dictionary<string, object>)groupObj)["items"])
                {
                    var r = new Recommends {
                        Venue = new Venue((Dictionary<string, object>) ((Dictionary<string, object>) itemObj)["venue"])};

                    if (((Dictionary<string, object>) itemObj).ContainsKey("tips"))
                        foreach (var tipObj in (object[]) ((Dictionary<string, object>) itemObj)["tips"])
                            r.Tips.Add(new Tip((Dictionary<string, object>) tipObj));
                    foreach (var reasonObj in (object[])Helpers.ExtractDictionary((Dictionary<string, object>)itemObj, "reasons")["items"])
                    {
                        var reas = new Reason {
                            Type = ((Dictionary<string, object>) reasonObj)["type"].ToString(),
                            Message = ((Dictionary<string, object>) reasonObj)["message"].ToString()};

                        r.Reasons.Add(reas);
                    }
                    recs.Add(r);
                }
                Places.Add(type, recs);
            }
        }
 // WARNING! LoaderLock danger here
 //          LoadNotification event handler must be very careful, not load any other managed library etc...
 void Notification(Reason notificationReason, IntPtr pNotificationData, IntPtr context)
 {
     IntPtr pFullDllName = Marshal.ReadIntPtr(pNotificationData, IntPtr.Size); // The offset is determined by the natural size for the struct packing
         string fullDllName = UnicodeString.ToString(pFullDllName);
         NotificationEventArgs args = new NotificationEventArgs { Reason = notificationReason, FullDllName = fullDllName };
         LoadNotification?.Invoke(this, args);
 }
Exemple #15
0
 /// <summary>
 /// Creates a {@code CertPathValidatorException} with the specified
 /// detail message, cause, certification path, index, and reason.
 /// </summary>
 /// <param name="msg"> the detail message (or {@code null} if none) </param>
 /// <param name="cause"> the cause (or {@code null} if none) </param>
 /// <param name="certPath"> the certification path that was in the process of
 /// being validated when the error was encountered </param>
 /// <param name="index"> the index of the certificate in the certification path
 /// that caused the error (or -1 if not applicable). Note that
 /// the list of certificates in a {@code CertPath} is zero based. </param>
 /// <param name="reason"> the reason the validation failed </param>
 /// <exception cref="IndexOutOfBoundsException"> if the index is out of range
 /// {@code (index < -1 || (certPath != null && index >=
 /// certPath.getCertificates().size()) } </exception>
 /// <exception cref="IllegalArgumentException"> if {@code certPath} is
 /// {@code null} and {@code index} is not -1 </exception>
 /// <exception cref="NullPointerException"> if {@code reason} is {@code null}
 ///
 /// @since 1.7 </exception>
 public CertPathValidatorException(String msg, Throwable cause, CertPath certPath, int index, Reason reason) : base(msg, cause)
 {
     if (certPath == null && index != -1)
     {
         throw new IllegalArgumentException();
     }
     if (index < -1 || (certPath != null && index >= certPath.Certificates.Count))
     {
         throw new IndexOutOfBoundsException();
     }
     if (reason == null)
     {
         throw new NullPointerException("reason can't be null");
     }
     this.CertPath_Renamed = certPath;
     this.Index_Renamed    = index;
     this.Reason_Renamed   = reason;
 }
Exemple #16
0
        public static string ReasonMessage(Reason reason)
        {
            switch (reason)
            {
            case Reason.WillBeMaster:
                return(Messages.MASTER);

            case Reason.Allowed:
                return("");

            case Reason.Connecting:
                return(Messages.CONNECTING);

            case Reason.MasterNotConnected:
                return(Messages.NEWPOOL_MASTER_DISCONNECTED);

            case Reason.MasterConnecting:
                return(Messages.NEWPOOL_MASTER_CONNECTING);

            case Reason.DifferentAdConfig:
                return(Messages.NEWPOOL_DIFFERING_AD_CONFIG);

            case Reason.HasRunningVMs:
                return(Messages.NEWPOOL_HAS_RUNNING_VMS);

            case Reason.HasSharedStorage:
                return(Messages.NEWPOOL_HAS_SHARED_STORAGE);

            case Reason.IsAPool:
                return(Messages.NEWPOOL_IS_A_POOL);

            case Reason.LicenseRestriction:
                return(Messages.NEWPOOL_POOLINGRESTRICTED);

            case Reason.NotSameLinuxPack:
                return(Messages.NEWPOOL_LINUXPACK);

            case Reason.PaidHostFreeMaster:
                return(Messages.NEWPOOL_PAID_HOST_FREE_MASTER);

            case Reason.FreeHostPaidMaster:
                return(Messages.NEWPOOL_FREE_HOST_PAID_MASTER);

            case Reason.LicensedHostUnlicensedMaster:
                return(Messages.NEWPOOL_LICENSED_HOST_UNLICENSED_MASTER);

            case Reason.UnlicensedHostLicensedMaster:
                return(Messages.NEWPOOL_UNLICENSED_HOST_LICENSED_MASTER);

            case Reason.LicenseMismatch:
                return(Messages.NEWPOOL_LICENSEMISMATCH);

            case Reason.DifferentServerVersion:
                return(Messages.NEWPOOL_DIFF_SERVER);

            case Reason.DifferentCPUs:
                return(Messages.NEWPOOL_DIFF_HARDWARE);

            case Reason.DifferentNetworkBackends:
                return(Messages.NEWPOOL_DIFFERENT_NETWORK_BACKENDS);

            case Reason.NotConnected:
                return(Messages.DISCONNECTED);

            case Reason.MasterHasHA:
                return(Messages.POOL_JOIN_FORBIDDEN_BY_HA);

            case Reason.NotPhysicalPif:
                return(Messages.POOL_JOIN_NOT_PHYSICAL_PIF);

            case Reason.WrongRoleOnMaster:
                return(Messages.NEWPOOL_MASTER_ROLE);

            case Reason.WrongRoleOnSlave:
                return(Messages.NEWPOOL_SLAVE_ROLE);

            default:
                System.Diagnostics.Trace.Assert(false, "Unknown reason");
                return("");
            }
        }
 bool IEquatable <CompletionTrigger> .Equals(CompletionTrigger other) =>
 Reason.Equals(other.Reason) &&
 Character.Equals(other.Character) &&
 ViewSnapshotBeforeTrigger.Equals(other.ViewSnapshotBeforeTrigger);
 ///
 /// This constructor allows you to explicitly state the status.
 /// But does not allow you to set the exception!
 ///
 public TrackFinishedInfo( uint trackKey, Reason why )
 {
     _key = trackKey;
      _reason = why;
      _whatWentWrong = null;
 }
        void SetError (TorrentManager manager, Reason reason, Exception ex)
        {
            ClientEngine.MainLoop.Queue (delegate {
                if (manager.Mode is ErrorMode)
                    return;

                manager.Error = new Error (reason, ex);
                manager.Mode = new ErrorMode (manager);
            });
        }
 public CommandException(string commandName, bool send, Reason reason)
     : base((send ? "Send " : "Receive") + " :: " + commandName + GetMessage(reason))
 {
 }
Exemple #21
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as ChargeItem;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = (Hl7.Fhir.Model.Identifier)Identifier.DeepCopy();
            }
            if (DefinitionElement != null)
            {
                dest.DefinitionElement = new List <Hl7.Fhir.Model.FhirUri>(DefinitionElement.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.ChargeItem.ChargeItemStatus>)StatusElement.DeepCopy();
            }
            if (PartOf != null)
            {
                dest.PartOf = new List <Hl7.Fhir.Model.ResourceReference>(PartOf.DeepCopy());
            }
            if (Code != null)
            {
                dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Context != null)
            {
                dest.Context = (Hl7.Fhir.Model.ResourceReference)Context.DeepCopy();
            }
            if (Occurrence != null)
            {
                dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy();
            }
            if (Participant != null)
            {
                dest.Participant = new List <Hl7.Fhir.Model.ChargeItem.ParticipantComponent>(Participant.DeepCopy());
            }
            if (PerformingOrganization != null)
            {
                dest.PerformingOrganization = (Hl7.Fhir.Model.ResourceReference)PerformingOrganization.DeepCopy();
            }
            if (RequestingOrganization != null)
            {
                dest.RequestingOrganization = (Hl7.Fhir.Model.ResourceReference)RequestingOrganization.DeepCopy();
            }
            if (Quantity != null)
            {
                dest.Quantity = (Hl7.Fhir.Model.Quantity)Quantity.DeepCopy();
            }
            if (Bodysite != null)
            {
                dest.Bodysite = new List <Hl7.Fhir.Model.CodeableConcept>(Bodysite.DeepCopy());
            }
            if (FactorOverrideElement != null)
            {
                dest.FactorOverrideElement = (Hl7.Fhir.Model.FhirDecimal)FactorOverrideElement.DeepCopy();
            }
            if (PriceOverride != null)
            {
                dest.PriceOverride = (Hl7.Fhir.Model.Money)PriceOverride.DeepCopy();
            }
            if (OverrideReasonElement != null)
            {
                dest.OverrideReasonElement = (Hl7.Fhir.Model.FhirString)OverrideReasonElement.DeepCopy();
            }
            if (Enterer != null)
            {
                dest.Enterer = (Hl7.Fhir.Model.ResourceReference)Enterer.DeepCopy();
            }
            if (EnteredDateElement != null)
            {
                dest.EnteredDateElement = (Hl7.Fhir.Model.FhirDateTime)EnteredDateElement.DeepCopy();
            }
            if (Reason != null)
            {
                dest.Reason = new List <Hl7.Fhir.Model.CodeableConcept>(Reason.DeepCopy());
            }
            if (Service != null)
            {
                dest.Service = new List <Hl7.Fhir.Model.ResourceReference>(Service.DeepCopy());
            }
            if (Account != null)
            {
                dest.Account = new List <Hl7.Fhir.Model.ResourceReference>(Account.DeepCopy());
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            if (SupportingInformation != null)
            {
                dest.SupportingInformation = new List <Hl7.Fhir.Model.ResourceReference>(SupportingInformation.DeepCopy());
            }
            return(dest);
        }
 public async Task Update(Reason reason, int id)
 {
     await _unitOfWork.ReasonRepository.Update(reason, id);
 }
 public async Task Create(Reason reason)
 {
     await _unitOfWork.ReasonRepository.Create(reason);
 }
Exemple #24
0
 public DisconnectEventArgs(Reason exitReason, CommandError?error = null)
 {
     ExitReason = exitReason;
     Error      = error;
 }
 public CommandException(string commandName, bool send, Reason reason)
     : base((send ? "Send " : "Receive") + " :: " + commandName + GetMessage(reason))
 {
 }
Exemple #26
0
 public BitlyDotNETException(Reason reason, string message, Exception inner)
     : base(message, inner)
 {
     Reason = reason;
 }
Exemple #27
0
 public BitlyDotNETException(Reason reason, string message)
     : base(message)
 {
     Reason = reason;
 }
Exemple #28
0
		string Status( Reason reason, MatchSet.SetType type, string filename )
		{

			StringBuilder sb = new StringBuilder();
			sb.Append( "  " );
			for( int i = 0; i < ReasonValues.Length; ++i )
			{
				Reason r = (Reason)ReasonValues.GetValue( i );
				sb.Append( (reason == r) ? ReasonNames[i][0] : BLANK );
			}
			sb.Append( "  " );
			for( int i = 0; i < MatchValues.Length; ++i )
			{
				MatchSet.SetType t = (MatchSet.SetType)MatchValues.GetValue( i );
				sb.Append( (type == t) ? MatchNames[i][0] : BLANK );
			}
			return Status( sb.ToString(), filename );
		}
Exemple #29
0
 public GBException(Reason reason)
 {
     Debug.Write("GBException: "+reason.ToString());
 }
Exemple #30
0
 public ServiceException(Reason reason, string message)
     : this(HttpStatusCode.InternalServerError, reason, message)
 {
 }
        private void LoadReasons(Dictionary<string, object> navegationParams_)
        {
            if (navegationParams_ != null && navegationParams_.ContainsKey("ListaMotivos") && navegationParams_["ListaMotivos"] != null && navegationParams_["ListaMotivos"] as List<GetRequestReasonDTO> != null)
            {

                List<GetRequestReasonDTO> listaReasonDTO = (List<GetRequestReasonDTO>)navegationParams_["ListaMotivos"];

                // observable colection deve receber uma lista de dto
                var reasonListAux = new List<Reason>();

                foreach (GetRequestReasonDTO reasonDTO in listaReasonDTO)
                {
                    Reason r = new Reason();
                    r.NomeMotivo = reasonDTO.ReasonName;
                    r.Id = reasonDTO.ReasonId;
                    reasonListAux.Add(r);
                }

                ReasonList = reasonListAux;
            }
            else
            {
                ErrorMessage = "Erro ao carregar Lista de Motivos";
                ErrorId = Trace.CorrelationManager.ActivityId.ToString("D", CultureInfo.InvariantCulture);
                _logger.LogError("Navegation parameter 'ListaMotivos' not found");
                ViewState = ViewStates.LoadingError;
            }
        }
Exemple #32
0
 public ServiceException(HttpStatusCode statusCode, Reason reason, string message)
     : base(message)
 {
     this.StatusCode = statusCode;
     this.Reason     = reason;
 }
 public static string ReasonMessage(Reason reason)
 {
     switch (reason)
     {
         case Reason.WillBeMaster:
             return Messages.MASTER;
         case Reason.Allowed:
             return "";
         case Reason.Connecting:
             return Messages.CONNECTING;
         case Reason.MasterNotConnected:
             return Messages.NEWPOOL_MASTER_DISCONNECTED;
         case Reason.MasterConnecting:
             return Messages.NEWPOOL_MASTER_CONNECTING;
         case Reason.DifferentAdConfig:
             return Messages.NEWPOOL_DIFFERING_AD_CONFIG;
         case Reason.HasRunningVMs:
             return Messages.NEWPOOL_HAS_RUNNING_VMS;
         case Reason.HasSharedStorage:
             return Messages.NEWPOOL_HAS_SHARED_STORAGE;
         case Reason.IsAPool:
             return Messages.NEWPOOL_IS_A_POOL;
         case Reason.LicenseRestriction:
             return Messages.NEWPOOL_POOLINGRESTRICTED;
         case Reason.NotSameLinuxPack:
             return Messages.NEWPOOL_LINUXPACK;
         case Reason.PaidHostFreeMaster:
             return Messages.NEWPOOL_PAID_HOST_FREE_MASTER;
         case Reason.FreeHostPaidMaster:
             return Messages.NEWPOOL_FREE_HOST_PAID_MASTER;
         case Reason.LicenseMismatch:
             return Messages.NEWPOOL_LICENSEMISMATCH;
         case Reason.DifferentServerVersion:
             return Messages.NEWPOOL_DIFF_SERVER;
         case Reason.DifferentCPUs:
             return Messages.NEWPOOL_DIFF_HARDWARE;
         case Reason.DifferentNetworkBackends:
             return Messages.NEWPOOL_DIFFERENT_NETWORK_BACKENDS;
         case Reason.NotConnected:
             return Messages.DISCONNECTED;
         case Reason.MasterHasHA:
             return Messages.POOL_JOIN_FORBIDDEN_BY_HA;
         case Reason.WrongRoleOnMaster:
             return Messages.NEWPOOL_MASTER_ROLE;
         case Reason.WrongRoleOnSlave:
             return Messages.NEWPOOL_SLAVE_ROLE;
         default:
             System.Diagnostics.Trace.Assert(false, "Unknown reason");
             return "";
     }
 }
Exemple #34
0
 public Error(Reason reason, Exception exception)
 {
     Reason    = reason;
     Exception = exception;
 }
Exemple #35
0
 public BitlyDotNETException(Reason reason)
     : base()
 {
     Reason = reason;
 }
Exemple #36
0
 public BreakpointEvent(Reason reason, Breakpoint breakpoint) : base("breakpoint")
 {
     this.reason     = reason;
     this.breakpoint = breakpoint;
 }
Exemple #37
0
 protected virtual void BindStateFlags(CharacterStateFlags flags, Reason reason)
 {
 }
Exemple #38
0
 public void TestMethod(string notExistString, long notExistLong, bool notExistBool, Reason nonExistReason, StructArg nonExistStructArg)
 {
     NotExistString    = notExistString;
     NotExistLong      = notExistLong;
     NotExistBool      = notExistBool;
     NonExistReason    = nonExistReason;
     NonExistStructArg = nonExistStructArg;
 }
Exemple #39
0
 public ActionResult <Reason> post(Reason reason)
 {
     _context.Reason.Add(reason);
     _context.SaveChanges();
     return(Ok(reason));
 }
Exemple #40
0
 public void TestMethod(Reason reason, long eventId)
 {
     Reason  = reason;
     EventId = eventId;
 }
 /// <summary>
 /// Call this to put a message back to its default state.
 /// </summary>
 public override void Reset() 
 {
     mReason = Reason.Undefined;
 }
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as RiskAssessment;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (BasedOn != null)
            {
                dest.BasedOn = (Hl7.Fhir.Model.ResourceReference)BasedOn.DeepCopy();
            }
            if (Parent != null)
            {
                dest.Parent = (Hl7.Fhir.Model.ResourceReference)Parent.DeepCopy();
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.ObservationStatus>)StatusElement.DeepCopy();
            }
            if (Method != null)
            {
                dest.Method = (Hl7.Fhir.Model.CodeableConcept)Method.DeepCopy();
            }
            if (Code != null)
            {
                dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
            }
            if (Subject != null)
            {
                dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
            }
            if (Encounter != null)
            {
                dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
            }
            if (Occurrence != null)
            {
                dest.Occurrence = (Hl7.Fhir.Model.Element)Occurrence.DeepCopy();
            }
            if (Condition != null)
            {
                dest.Condition = (Hl7.Fhir.Model.ResourceReference)Condition.DeepCopy();
            }
            if (Performer != null)
            {
                dest.Performer = (Hl7.Fhir.Model.ResourceReference)Performer.DeepCopy();
            }
            if (Reason != null)
            {
                dest.Reason = new List <Hl7.Fhir.Model.CodeableReference>(Reason.DeepCopy());
            }
            if (Basis != null)
            {
                dest.Basis = new List <Hl7.Fhir.Model.ResourceReference>(Basis.DeepCopy());
            }
            if (Prediction != null)
            {
                dest.Prediction = new List <Hl7.Fhir.Model.RiskAssessment.PredictionComponent>(Prediction.DeepCopy());
            }
            if (MitigationElement != null)
            {
                dest.MitigationElement = (Hl7.Fhir.Model.FhirString)MitigationElement.DeepCopy();
            }
            if (Note != null)
            {
                dest.Note = new List <Hl7.Fhir.Model.Annotation>(Note.DeepCopy());
            }
            return(dest);
        }
Exemple #43
0
		void LogReason( Reason reason, string filename, bool occured )
		{
			if( occured )
			{
				Log( Status( reason, 0, filename ) );
				action( Action.Change, reason.ToString() );
			}
			else
			{
				Log( Status( Reason.Skipped, 0, filename ) );
				action( Action.Skip, "" );
			}
		}
Exemple #44
0
 public Result(Reason reason, int existing, int required)
 {
     mReason   = reason;
     mRequired = required;
     mExisting = existing;
 }
Exemple #45
0
 public GBException(Reason reason, Exception e)
     : base(e.Message)
 {
 }
 /// <summary>
 /// Initializes a new instance of the CheckNameAvailabilityResult
 /// class.
 /// </summary>
 /// <param name="nameAvailable">Gets a boolean value that indicates
 /// whether the name is available for you to use. If true, the name
 /// is available. If false, the name has already been taken or
 /// invalid and cannot be used.</param>
 /// <param name="reason">Gets the reason that a storage account name
 /// could not be used. The Reason element is only returned if
 /// NameAvailable is false. Possible values include:
 /// 'AccountNameInvalid', 'AlreadyExists'</param>
 /// <param name="message">Gets an error message explaining the Reason
 /// value in more detail.</param>
 public CheckNameAvailabilityResult(bool? nameAvailable = default(bool?), Reason? reason = default(Reason?), string message = default(string))
 {
     NameAvailable = nameAvailable;
     Reason = reason;
     Message = message;
 }
Exemple #47
0
 public LiftReject(Reason reason)
     : base(0x27)
 {
     WriteByte((byte)reason);
 }
 public override void Decode()
 {
     base.Decode();
     this.m_reason = (Reason)this.m_stream.ReadInt();
 }
Exemple #49
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as SupplyRequest;

            if (dest == null)
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }

            base.CopyTo(dest);
            if (Identifier != null)
            {
                dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
            }
            if (StatusElement != null)
            {
                dest.StatusElement = (Code <Hl7.Fhir.Model.SupplyRequest.SupplyRequestStatus>)StatusElement.DeepCopy();
            }
            if (Category != null)
            {
                dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy();
            }
            if (PriorityElement != null)
            {
                dest.PriorityElement = (Code <Hl7.Fhir.Model.RequestPriority>)PriorityElement.DeepCopy();
            }
            if (Item != null)
            {
                dest.Item = (Hl7.Fhir.Model.CodeableReference)Item.DeepCopy();
            }
            if (Quantity != null)
            {
                dest.Quantity = (Hl7.Fhir.Model.Quantity)Quantity.DeepCopy();
            }
            if (Parameter != null)
            {
                dest.Parameter = new List <Hl7.Fhir.Model.SupplyRequest.ParameterComponent>(Parameter.DeepCopy());
            }
            if (Occurrence != null)
            {
                dest.Occurrence = (Hl7.Fhir.Model.DataType)Occurrence.DeepCopy();
            }
            if (AuthoredOnElement != null)
            {
                dest.AuthoredOnElement = (Hl7.Fhir.Model.FhirDateTime)AuthoredOnElement.DeepCopy();
            }
            if (Requester != null)
            {
                dest.Requester = (Hl7.Fhir.Model.ResourceReference)Requester.DeepCopy();
            }
            if (Supplier != null)
            {
                dest.Supplier = new List <Hl7.Fhir.Model.ResourceReference>(Supplier.DeepCopy());
            }
            if (Reason != null)
            {
                dest.Reason = new List <Hl7.Fhir.Model.CodeableReference>(Reason.DeepCopy());
            }
            if (DeliverFrom != null)
            {
                dest.DeliverFrom = (Hl7.Fhir.Model.ResourceReference)DeliverFrom.DeepCopy();
            }
            if (DeliverTo != null)
            {
                dest.DeliverTo = (Hl7.Fhir.Model.ResourceReference)DeliverTo.DeepCopy();
            }
            return(dest);
        }
Exemple #50
0
 public bool Equals(Reason other)
 {
     return(string.Equals(Name, other.Name));
 }
 public Error(Reason reason, Exception exception)
 {
     this.reason = reason;
     this.exception = exception;
 }
Exemple #52
0
 public RelatedField(string fieldName, double score, Reason reason)
 {
     throw new global::System.NotImplementedException("RelatedField");
 }
 public AuthFailedMessage (AuthManager manager, Reason reason, Exception ex = null) : base (manager)
 {
     this.reason = reason;
     this.exception = ex;
 }
Exemple #54
0
 public void setReason(Reason reason)
 {
     throw new global::System.NotImplementedException("RelatedField.SetReason");
 }
Exemple #55
0
        /// <summary>
        /// Changes the session state and 
        /// sends a failed session envelope
        /// to the node to comunicate the
        /// finished session and closes
        /// the transport
        /// </summary>
        /// <param name="reason"></param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentNullException">reason</exception>
        public async Task SendFailedSessionAsync(Reason reason)
        {
            if (reason == null)
            {
                throw new ArgumentNullException("reason");
            }

            base.State = SessionState.Failed;

            var session = new Session()
            {
                Id = base.SessionId,
                From = base.LocalNode,
                To = base.RemoteNode,
                State = base.State,
                Reason = reason
            };

            await base.SendSessionAsync(session).ConfigureAwait(false);
            await base.Transport.CloseAsync(CancellationToken.None).ConfigureAwait(false);
        }
 public override int GetHashCode() => Reason.GetHashCode() ^ Character.GetHashCode();
Exemple #57
0
        public override IDeepCopyable CopyTo(IDeepCopyable other)
        {
            var dest = other as Procedure;

            if (dest != null)
            {
                base.CopyTo(dest);
                if (Identifier != null)
                {
                    dest.Identifier = new List <Hl7.Fhir.Model.Identifier>(Identifier.DeepCopy());
                }
                if (Subject != null)
                {
                    dest.Subject = (Hl7.Fhir.Model.ResourceReference)Subject.DeepCopy();
                }
                if (StatusElement != null)
                {
                    dest.StatusElement = (Code <Hl7.Fhir.Model.Procedure.ProcedureStatus>)StatusElement.DeepCopy();
                }
                if (Category != null)
                {
                    dest.Category = (Hl7.Fhir.Model.CodeableConcept)Category.DeepCopy();
                }
                if (Code != null)
                {
                    dest.Code = (Hl7.Fhir.Model.CodeableConcept)Code.DeepCopy();
                }
                if (NotPerformedElement != null)
                {
                    dest.NotPerformedElement = (Hl7.Fhir.Model.FhirBoolean)NotPerformedElement.DeepCopy();
                }
                if (ReasonNotPerformed != null)
                {
                    dest.ReasonNotPerformed = new List <Hl7.Fhir.Model.CodeableConcept>(ReasonNotPerformed.DeepCopy());
                }
                if (BodySite != null)
                {
                    dest.BodySite = new List <Hl7.Fhir.Model.CodeableConcept>(BodySite.DeepCopy());
                }
                if (Reason != null)
                {
                    dest.Reason = (Hl7.Fhir.Model.Element)Reason.DeepCopy();
                }
                if (Performer != null)
                {
                    dest.Performer = new List <Hl7.Fhir.Model.Procedure.PerformerComponent>(Performer.DeepCopy());
                }
                if (Performed != null)
                {
                    dest.Performed = (Hl7.Fhir.Model.Element)Performed.DeepCopy();
                }
                if (Encounter != null)
                {
                    dest.Encounter = (Hl7.Fhir.Model.ResourceReference)Encounter.DeepCopy();
                }
                if (Location != null)
                {
                    dest.Location = (Hl7.Fhir.Model.ResourceReference)Location.DeepCopy();
                }
                if (Outcome != null)
                {
                    dest.Outcome = (Hl7.Fhir.Model.CodeableConcept)Outcome.DeepCopy();
                }
                if (Report != null)
                {
                    dest.Report = new List <Hl7.Fhir.Model.ResourceReference>(Report.DeepCopy());
                }
                if (Complication != null)
                {
                    dest.Complication = new List <Hl7.Fhir.Model.CodeableConcept>(Complication.DeepCopy());
                }
                if (FollowUp != null)
                {
                    dest.FollowUp = new List <Hl7.Fhir.Model.CodeableConcept>(FollowUp.DeepCopy());
                }
                if (Request != null)
                {
                    dest.Request = (Hl7.Fhir.Model.ResourceReference)Request.DeepCopy();
                }
                if (Notes != null)
                {
                    dest.Notes = new List <Hl7.Fhir.Model.Annotation>(Notes.DeepCopy());
                }
                if (FocalDevice != null)
                {
                    dest.FocalDevice = new List <Hl7.Fhir.Model.Procedure.FocalDeviceComponent>(FocalDevice.DeepCopy());
                }
                if (Used != null)
                {
                    dest.Used = new List <Hl7.Fhir.Model.ResourceReference>(Used.DeepCopy());
                }
                return(dest);
            }
            else
            {
                throw new ArgumentException("Can only copy to an object of the same type", "other");
            }
        }
Exemple #58
0
 public override string ToString()
 {
     return("CompCode: " + CompletionCode.ToString() + ", Reason: " + Reason.ToString());
 }
Exemple #59
0
 public CartChangedEventArgs(Article article, Reason action)
 {
     this.Article = article;
     this.Action = action;
 }
 public AweStreamException(string message, Reason reason)
     : base(message)
 {
 }