コード例 #1
0
ファイル: NullableEntity.cs プロジェクト: mlivensp/csla
            protected override void Execute(Csla.Rules.IRuleContext context)
            {
                var input = (string)context.InputPropertyValues[PrimaryProperty];

                if (string.IsNullOrEmpty(input))
                {
                    context.AddOutValue(_clearProperty, null);
                }
            }
コード例 #2
0
            protected override void Execute(Csla.Rules.IRuleContext context)
            {
                var sender = (Root)context.Target;

                using (sender.BypassPropertyChecks)
                {
                    var value = (string)context.InputPropertyValues[PrimaryProperty];
                    if (!string.IsNullOrEmpty(value))
                    {
                        context.AddOutValue(PrimaryProperty, value.ToUpper());
                    }
                }
            }