Exemplo n.º 1
0
        /// <summary>
        /// Gets the <see cref="IPropertySync"/> instances for the given <paramref name="type"/>.
        /// </summary>
        /// <param name="type">The <see cref="Type"/> to get the <see cref="IPropertySync"/>s for.</param>
        /// <returns>The <see cref="IPropertySync"/> instances for the given <paramref name="type"/>.</returns>
        public static IEnumerable <IPropertySync> GetPropertySyncs(Type type)
        {
            var infos = _factory[type];
            var ret   = new IPropertySync[infos.Length];

            // Loop through each of the property sync infos
            for (var i = 0; i < ret.Length; i++)
            {
                var instance = GetPropertySync(infos[i]);
                ret[i] = instance;
            }

            return(ret);
        }
Exemplo n.º 2
0
 /// <summary>
 /// When overridden in the derived class, allows for additional handling of a property that is
 /// being serialized, immediately after the value has been written to the <paramref name="writer"/>.
 /// </summary>
 /// <param name="writer">IValueWriter that the property value is being serialized to.</param>
 /// <param name="propertySync">PropertySyncBase for the property that is being serialized.</param>
 protected virtual void OnSerializeProperty(IValueWriter writer, IPropertySync propertySync)
 {
 }
Exemplo n.º 3
0
 /// <summary>
 /// When overridden in the derived class, allows for additional handling of a property that is
 /// being serialized, immediately after the value has been written to the <paramref name="writer"/>.
 /// </summary>
 /// <param name="writer">IValueWriter that the property value is being serialized to.</param>
 /// <param name="propertySync">PropertySyncBase for the property that is being serialized.</param>
 protected virtual void OnSerializeProperty(IValueWriter writer, IPropertySync propertySync)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// When overridden in the derived class, allows for additional handling of a property that is
 /// being deserialized, immediately after the value has been read from the <paramref name="reader"/>.
 /// </summary>
 /// <param name="reader">IValueReader that the property value is being deserialized from.</param>
 /// <param name="propertySync">PropertySyncBase for the property that is being deserialized.</param>
 protected virtual void OnDeserializeProprety(IValueReader reader, IPropertySync propertySync)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// When overridden in the derived class, allows for additional handling of a property that is
 /// being deserialized, immediately after the value has been read from the <paramref name="reader"/>.
 /// </summary>
 /// <param name="reader">IValueReader that the property value is being deserialized from.</param>
 /// <param name="propertySync">PropertySyncBase for the property that is being deserialized.</param>
 protected virtual void OnDeserializeProprety(IValueReader reader, IPropertySync propertySync)
 {
 }