Exemple #1
0
        private void Modifying()
        {
            //if (OwnerNode != null)
            //    OwnerNode.BackwardCompatibilityPropertySet(PropertyType.Name, this);

            if (IsModified)
            {
                return;
            }

            //-- Clone
            var             orig = (BinaryDataValue)OwnerNode.Data.GetDynamicRawData(PropertyType);
            BinaryDataValue data;

            if (orig == null)
            {
                data = GetDefaultRawData();
            }
            else
            {
                data = new BinaryDataValue
                {
                    Id          = orig.Id,
                    ContentType = orig.ContentType,
                    FileName    = orig.FileName,
                    Size        = orig.Size,
                    Checksum    = orig.Checksum,
                    Stream      = orig.Stream
                };
            }
            OwnerNode.MakePrivateData();
            OwnerNode.Data.SetDynamicRawData(PropertyType, data, false);
        }
        private void Modifying()
        {
            if (IsModified)
            {
                return;
            }

            // Clone
            var             orig = (BinaryDataValue)OwnerNode.Data.GetDynamicRawData(PropertyType);
            BinaryDataValue data;

            if (orig == null)
            {
                data = GetDefaultRawData();
            }
            else
            {
                data = new BinaryDataValue
                {
                    Id               = orig.Id,
                    FileId           = orig.FileId,
                    ContentType      = orig.ContentType,
                    FileName         = orig.FileName,
                    Size             = orig.Size,
                    BlobProviderName = orig.BlobProviderName,
                    BlobProviderData = orig.BlobProviderData,
                    Checksum         = orig.Checksum,
                    Stream           = orig.Stream
                };
            }
            OwnerNode.MakePrivateData();
            OwnerNode.Data.SetDynamicRawData(PropertyType, data, false);
        }
Exemple #3
0
 private void ChangeData(List <int> newData)
 {
     if (OwnerNode != null)
     {
         OwnerNode.MakePrivateData();
         OwnerNode.Data.SetDynamicRawData(PropertyType, newData);
     }
     else
     {
         __privateList = newData;
     }
 }
Exemple #4
0
        private void Modifying()
        {
            if (IsModified)
            {
                return;
            }
            // Clone
            var orig  = (List <int>)OwnerNode.Data.GetDynamicRawData(PropertyType);
            var clone = orig == null ? new List <int>() : new List <int>(orig);

            OwnerNode.MakePrivateData();
            OwnerNode.Data.SetDynamicRawData(PropertyType, clone, false);
        }