Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="auditSource"></param>
        /// <param name="outcome"></param>
        /// <param name="type"></param>
        /// <param name="idOfApplicationStarted">Add the ID of the Application Started, should be called once.</param>
        public ApplicationActivityAuditHelper(DicomAuditSource auditSource,
                                              EventIdentificationContentsEventOutcomeIndicator outcome,
                                              ApplicationActivityType type,
                                              AuditProcessActiveParticipant idOfApplicationStarted) : base("ApplicationActivity")
        {
            AuditMessage.EventIdentification                          = new EventIdentificationContents();
            AuditMessage.EventIdentification.EventID                  = EventID.ApplicationActivity;
            AuditMessage.EventIdentification.EventActionCode          = EventIdentificationContentsEventActionCode.E;
            AuditMessage.EventIdentification.EventActionCodeSpecified = true;
            AuditMessage.EventIdentification.EventDateTime            = Platform.Time.ToUniversalTime();
            AuditMessage.EventIdentification.EventOutcomeIndicator    = outcome;

            InternalAddAuditSource(auditSource);

            if (type == ApplicationActivityType.ApplicationStarted)
            {
                AuditMessage.EventIdentification.EventTypeCode = new EventTypeCode[] { EventTypeCode.ApplicationStart }
            }
            ;
            else
            {
                AuditMessage.EventIdentification.EventTypeCode = new EventTypeCode[] { EventTypeCode.ApplicationStop }
            };

            idOfApplicationStarted.UserIsRequestor = false;
            idOfApplicationStarted.RoleIdCode      = RoleIDCode.Application;

            InternalAddActiveParticipant(idOfApplicationStarted);
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="outcome">The outcome of the audit event.</param>
        /// <param name="type">Network Attach or Detach</param>
        /// <param name="node">The identity of the node entering or leaving the network</param>
        /// <param name="auditSource">The source of the audit message.</param>
        public NetworkEntryAuditHelper(DicomAuditSource auditSource, EventIdentificationContentsEventOutcomeIndicator outcome, NetworkEntryType type, AuditProcessActiveParticipant node)
            : base("NetworkEntry")

        {
            AuditMessage.EventIdentification                          = new EventIdentificationContents();
            AuditMessage.EventIdentification.EventID                  = EventID.NetworkEntry;
            AuditMessage.EventIdentification.EventActionCode          = EventIdentificationContentsEventActionCode.E;
            AuditMessage.EventIdentification.EventActionCodeSpecified = true;
            AuditMessage.EventIdentification.EventDateTime            = Platform.Time.ToUniversalTime();
            AuditMessage.EventIdentification.EventOutcomeIndicator    = outcome;

            if (type == NetworkEntryType.Attach)
            {
                AuditMessage.EventIdentification.EventTypeCode = new EventTypeCode[] { EventTypeCode.Attach }
            }
            ;
            else
            {
                AuditMessage.EventIdentification.EventTypeCode = new EventTypeCode[] { EventTypeCode.Detach }
            };

            node.UserIsRequestor = false;
            InternalAddActiveParticipant(node);

            InternalAddAuditSource(auditSource);
        }
    }
 /// <summary>
 /// The identity of the node that is authenticating the user. This is to
 /// identify another node that is performing enterprise wide
 /// authentication, e.g. Kerberos authentication.
 /// </summary>
 /// <param name="participant">The participant.</param>
 public void AddNode(AuditProcessActiveParticipant participant)
 {
     participant.UserIsRequestor = false;
     InternalAddActiveParticipant(participant);
 }