コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SerializableEntity"/> class.
        /// </summary>
        public SerializableEntity()
        {
            Attributes      = new SerializableAttributeCollection();
            FormattedValues = new SerializableFormattedValueCollection();
            RelatedEntities = new SerializableRelatedEntityCollection();
#if !PRE_KEYATTRIBUTE
            KeyAttributes = new SerializableKeyAttributeCollection();
#endif
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SerializableEntity"/> class.
        /// </summary>
        /// <param name="entity">The entity.</param>
        public SerializableEntity(Entity entity)
        {
            Attributes      = new SerializableAttributeCollection(entity.Attributes);
            EntityState     = entity.EntityState;
            ExtensionData   = entity.ExtensionData;
            FormattedValues = new SerializableFormattedValueCollection(entity.FormattedValues);
            Id              = entity.Id;
            LogicalName     = entity.LogicalName;
            RelatedEntities = new SerializableRelatedEntityCollection(entity.RelatedEntities);
#if !PRE_KEYATTRIBUTE
            KeyAttributes = new SerializableKeyAttributeCollection(entity.KeyAttributes);
            RowVersion    = entity.RowVersion;
#endif
        }