Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SyncValueAttributeInfo"/> class.
        /// </summary>
        /// <param name="pi">The <see cref="PropertyInfo"/>.</param>
        /// <param name="sva">The <see cref="SyncValueAttribute"/>.</param>
        protected internal SyncValueAttributeInfo(PropertyInfo pi, SyncValueAttribute sva)
        {
            _skipNetworkSync = sva.SkipNetworkSync;

            // Find the name to use (CustomName if one supplied, otherwise use the Property's name)
            if (string.IsNullOrEmpty(sva.CustomName))
                _name = pi.Name;
            else
                _name = sva.CustomName;
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SyncValueAttributeInfo"/> class.
        /// </summary>
        /// <param name="pi">The <see cref="PropertyInfo"/>.</param>
        /// <param name="sva">The <see cref="SyncValueAttribute"/>.</param>
        protected internal SyncValueAttributeInfo(PropertyInfo pi, SyncValueAttribute sva)
        {
            _skipNetworkSync = sva.SkipNetworkSync;

            // Find the name to use (CustomName if one supplied, otherwise use the Property's name)
            if (string.IsNullOrEmpty(sva.CustomName))
            {
                _name = pi.Name;
            }
            else
            {
                _name = sva.CustomName;
            }
        }