Source/NFX/DataAccess/Distributed/Parcel.cs
/// <summary>
/// Merges other parcel instances into this one.
/// A parcel type may support merging (when DataParcel attribute SupportsMerge is set to true) of data from other parcels/versions into this instance.
/// This parcel must not be sealed as merge may change the payload in which case TRUE is returned. The parcel needs to be sealed again after the change.
/// If a call to this method returns false, then nothing was changed as this instance already contains the latest data/could not be merged.
/// Merging is used for version conflict resolution: servers check if the type of the updated parcel instance SupportsMerge, then if it does, Opens parcel
/// and calls this method passing other versions in question to this method. The framework does not impose a limit on the supplied parcel types, however
/// most of the parcel types support merge only with the same-typed parcel instances.
/// IMPORTANT: The ordering of parcel versions is not guaranteed.
/// </summary>
/// <param name="others">Other parcel versions/data</param>
/// <returns>True if Merge() generated newer version/changed payload. False when Merge did not/could not change existing parcel</returns>
Merges other parcel instances into this one.
A parcel type may support merging (when DataParcel attribute SupportsMerge is set to true) of data from other parcels/versions into this instance.
This parcel must not be sealed as merge may change the payload in which case TRUE is returned. The parcel needs to be sealed again after the change.
If a call to this method returns false, then nothing was changed as this instance already contains the latest data/could not be merged.
Merging is used for version conflict resolution: servers check if the type of the updated parcel instance SupportsMerge, then if it does, Opens parcel
and calls this method passing other versions in question to this method. The framework does not impose a limit on the supplied parcel types, however
most of the parcel types support merge only with the same-typed parcel instances.
IMPORTANT: The ordering of parcel versions is not guaranteed.
Merges other parcel instances into this one . A parcel type may support merging ( when DataParcel attribute SupportsMerge is set to true ) of data from other parcels / versions into this instance . This parcel must not be sealed as merge may change the payload in which case TRUE is returned . The parcel needs to be sealed again after the change . If a call to this method returns false then nothing was changed as this instance already contains the latest data / could not be merged . Merging is used for version conflict resolution : servers check if the type of the updated parcel instance SupportsMerge then if it does Opens parcel and calls this method passing other versions in question to this method . The framework does not impose a limit on the supplied parcel types however most of the parcel types support merge only with the same - typed parcel instances . IMPORTANT : The ordering of parcel versions is not guaranteed .
public bool Merge(IEnumerable<Parcel> others)
            {
              if (others==null)
                 throw new DistributedDataAccessException(StringConsts.DISTRIBUTED_DATA_PARCEL_INVALID_OPERATION_ERROR.Args("Merge", GetType().FullName, "others==null") );
              if (m_State!= ParcelState.Creating && m_State!=ParcelState.Modifying)
                 throw new DistributedDataAccessException(StringConsts.DISTRIBUTED_DATA_PARCEL_INVALID_OPERATION_ERROR.Args("Merge", GetType().FullName, m_State) );
              if (!MetadataAttribute.SupportsMerge)
                 throw new DistributedDataAccessException(StringConsts.DISTRIBUTED_DATA_PARCEL_INVALID_OPERATION_ERROR.Args("Merge", GetType().FullName, "SupportMerge==false") );
              return DoMerge(others);
            }
public bool Merge ( IEnumerable < Parcel > others ) { if ( others == null ) throw new DistributedDataAccessException ( StringConsts . DISTRIBUTED_DATA_PARCEL_INVALID_OPERATION_ERROR . Args ( " " , GetType ( ) . FullName , " " ) ) ; if ( m_State != ParcelState . Creating && m_State != ParcelState . Modifying ) throw new DistributedDataAccessException ( StringConsts . DISTRIBUTED_DATA_PARCEL_INVALID_OPERATION_ERROR . Args ( " " , GetType ( ) . FullName , m_State ) ) ; if ( ! MetadataAttribute . SupportsMerge ) throw new DistributedDataAccessException ( StringConsts . DISTRIBUTED_DATA_PARCEL_INVALID_OPERATION_ERROR . Args ( " " , GetType ( ) . FullName , " " ) ) ; return DoMerge ( others ) ; }
Merges other parcel instances into this one.
Merges other parcel instances into this one .
True if Merge() generated newer version/changed payload. False when Merge did not/could not change existing parcel
True if Merge () generated newer version / changed payload . False when Merge did not / could not change existing parcel
others
IEnumerable<Parcel>
Other parcel versions/data
Other parcel versions / data