コード例 #1
0
ファイル: EventArgs.cs プロジェクト: j-prox/blueprint41
 protected PropertyEventArgs(OGMImpl sender, Property property, OperationEnum operation, object?previousValue, object?assignedValue) : base(sender)
 {
     Property  = property;
     Operation = operation;
     PreviousValueInternalBridge = previousValue;
     AssignedValueInternalBridge = assignedValue;
 }
コード例 #2
0
ファイル: EventArgs.cs プロジェクト: j-prox/blueprint41
        protected EntityEventArgs(OGMImpl sender)
        {
            Entity      = sender?.GetEntity() !;
            Transaction = sender?.DbTransaction !;

            Canceled = false;
            Flushed  = false;
        }
コード例 #3
0
ファイル: EventArgs.cs プロジェクト: j-prox/blueprint41
        internal static EntityEventArgs CreateInstance(EventTypeEnum eventType, OGMImpl sender, Transaction trans, bool locked = false)
        {
            Type type = sender.GetEntity().EntityEventArgsType;

            EntityEventArgs args = (EntityEventArgs)Activator.CreateInstance(type, true) !;

            args.EventType            = eventType;
            args.SenderInternalBridge = sender;
            args.Entity      = sender.GetEntity();
            args.Transaction = trans;
            args.Locked      = locked;

            sender.AppendEventHistory(args);

            return(args);
        }
コード例 #4
0
ファイル: EventArgs.cs プロジェクト: j-prox/blueprint41
        internal static PropertyEventArgs CreateInstance(EventTypeEnum eventType, OGMImpl sender, Property property, object?previousValue, object?assignedValue, DateTime moment, OperationEnum operation, Transaction trans)
        {
            Type senderType = sender.GetType();
            Type argsType   = property.GetPropertyEventArgsType(senderType);

            PropertyEventArgs args = (PropertyEventArgs)Activator.CreateInstance(argsType, true) !;

            args.EventType            = eventType;
            args.SenderInternalBridge = sender;
            args.Entity    = sender.GetEntity();
            args.Property  = property;
            args.Operation = operation;
            args.PreviousValueInternalBridge = previousValue;
            args.AssignedValueInternalBridge = assignedValue;
            args.Moment      = moment;
            args.Transaction = trans;

            sender.AppendEventHistory(args);

            return(args);
        }