Пример #1
0
		public void FromLeftToRightType(ItemAttachment left, ItemAttachment right)
		{
			using (Item item = left.GetItem())
			{
				right.Item = StorageEntityFactory.CreateFromItem(item);
				right.Item.Id = null;
				this.UpdateNestedAttachmentIds(right.Item.Attachments, right.Id);
			}
		}
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseEmulationConnector"/>.
        /// </summary>
        /// <param name="emulationAdapter">Emulation message adapter.</param>
        /// <param name="applyHeartbeat">Apply on/off heartbeat mode for the specified adapter.</param>
        public BaseEmulationConnector(EmulationMessageAdapter emulationAdapter, bool applyHeartbeat)
        {
            Adapter.InnerAdapters.Add(emulationAdapter ?? throw new ArgumentNullException(nameof(emulationAdapter)));
            Adapter.ApplyHeartbeat(EmulationAdapter, applyHeartbeat);

            TimeChange = false;

            EntityFactory = new StorageEntityFactory(emulationAdapter.Emulator.SecurityProvider, emulationAdapter.Emulator.PortfolioProvider);
        }