コード例 #1
0
ファイル: Field{T}.cs プロジェクト: wattson-coder/crmcore
        private T ValidateProperties(FieldProperties newProperties)
        {
            if (!(newProperties is T typedProperties))
            {
                throw new ArgumentException($"Properties must be of type '{typeof(T)}", nameof(newProperties));
            }

            return(typedProperties);
        }
コード例 #2
0
ファイル: Field{T}.cs プロジェクト: wattson-coder/crmcore
        public override void Update(FieldProperties newProperties)
        {
            var typedProperties = ValidateProperties(newProperties);

            properties = typedProperties;
        }
コード例 #3
0
ファイル: Field.cs プロジェクト: wattson-coder/crmcore
 public abstract void Update(FieldProperties newProperties);