/// <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 }
/// <summary> /// Initializes a new instance of the <see cref="SerializableEntityReference"/> class. /// </summary> /// <param name="entityReference">The entity reference.</param> public SerializableEntityReference(EntityReference entityReference) { Id = entityReference.Id; LogicalName = entityReference.LogicalName; Name = entityReference.Name; #if !PRE_KEYATTRIBUTE KeyAttributes = new SerializableKeyAttributeCollection(entityReference.KeyAttributes); RowVersion = entityReference.RowVersion; #endif }
/// <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 }
/// <summary> /// Initializes a new instance of the <see cref="SerializableEntityReference"/> class. /// </summary> public SerializableEntityReference() { KeyAttributes = new SerializableKeyAttributeCollection(); }