public RemoveParticipantOperation(WaveletOperationContext context, ParticipantId participant)
            : base(context)
        {
            Contract.Ensures(participant != null);

            ParticipantId = participant;
        }
 /// <summary>
 ///     Creates a new instance of <see cref="VersionUpdateOperation" />
 /// </summary>
 /// <param name="creator">creator to add or remove as a contributor</param>
 /// <param name="versionIncrement">version increment when the operation is applied</param>
 /// <param name="hashedVersion">distinct version after the operation is applied</param>
 /// <param name="docId">optional document whose version is to be updated</param>
 /// <param name="docVersion">
 ///     if <paramref name="useFixedBlipInfo" />, the last modified version to apply to blip being
 ///     updated
 /// </param>
 /// <param name="useFixedBlipInfo">whether to use the remaining two fields</param>
 public VersionUpdateOperation(ParticipantId creator, long versionIncrement, HashedVersion hashedVersion,
                               string docId = null, long docVersion = -1, bool useFixedBlipInfo = false)
     : base(new WaveletOperationContext(creator, new DateTime(), versionIncrement, hashedVersion))
 {
     _docId = docId;
     _docVersion = docVersion;
     _useFixedBlipInfo = useFixedBlipInfo;
 }
 /// <summary>
 ///     Creates a context.
 /// </summary>
 /// <param name="creator">operation creator</param>
 /// <param name="timestamp">operation time</param>
 /// <param name="versionIncrement">number of version increment</param>
 /// <param name="hashedVersion">new hashed version (or null)</param>
 public WaveletOperationContext(ParticipantId creator, DateTime timestamp, long versionIncrement,
                                HashedVersion hashedVersion = null)
 {
     Creator = creator;
     Timestamp = timestamp;
     VersionIncrement = versionIncrement;
     HashedVersion = hashedVersion;
 }
        public AddParticipantOperation(WaveletOperationContext context, ParticipantId participant,
                                       int position = EndPosition)
            : base(context)
        {
            Contract.Requires(participant != null);

            ParticipantId = participant;
            _position = position;
        }
Beispiel #5
0
        public WaveletDelta(ParticipantId author, IList<WaveletOperation> operations)
        {
            Contract.Ensures(author != null);
            Contract.Ensures(operations != null);
            Contract.Ensures(operations.Count > 0);

            _author = author;
            _operations = operations;
        }