コード例 #1
0
 public Bootstrapper(CommitContext commitContext, CommitSynchroniserContext commitSynchroniserContext, ServerContext serverContext, EventHandlerContext eventHandlerContext)
 {
     this.commitContext             = commitContext;
     this.commitSynchroniserContext = commitSynchroniserContext;
     this.serverContext             = serverContext;
     this.eventHandlerContext       = eventHandlerContext;
 }
コード例 #2
0
                public ICommitContext Fill(IValueSource valueSource, Func <IValueSource, MappedObjectKeys> getKeyFunction, Func <T> createObject)
                {
                    lock (_cache)
                    {
                        Init(true);

                        CommitContext commitContext = new CommitContext(this);
                        while (valueSource.Next())
                        {
                            MappedObjectKeys keys = getKeyFunction(valueSource);
                            if (_cache._itemsByKey.ContainsKey(keys))
                            {
                                IFillAbleObject item = _cache._itemsByKey[keys].Value;
                                if (item == null)
                                {
                                    _cache._itemsByKey[keys] = new WeakReference <IFillAbleObject>(item = (IFillAbleObject)createObject());
                                    ((System.ComponentModel.INotifyPropertyChanged)item).PropertyChanged += _cache.EntryValuePropertyChanged;
                                }
                                item.Fill(valueSource);
                                commitContext.AddEntryToCommit((T)item);
                            }
                            else
                            {
                                IFillAbleObject newObject = (IFillAbleObject)createObject();
                                newObject.Fill(valueSource);
                                _cache._itemsByKey.Add(keys, new WeakReference <IFillAbleObject>(newObject));
                                commitContext.AddEntryToCommit((T)newObject);
                                ((System.ComponentModel.INotifyPropertyChanged)newObject).PropertyChanged += _cache.EntryValuePropertyChanged;
                            }
                        }

                        return(commitContext);
                    }
                }
コード例 #3
0
ファイル: CommitItemTest.cs プロジェクト: windygu/AnkhSVN
            public override CommitContext ShowCommitDialogModal(CommitContext ctx)
            {
                ctx.LogMessage  = this.LogMessage;
                ctx.Cancelled   = this.Cancelled;
                ctx.CommitItems = this.CommitItems;

                this.ShowCommitDialogModalCalled = true;

                return(ctx);
            }
コード例 #4
0
 public CommitContextManager(IFileSystem contextFileSystem)
 {
     _fileSystem = contextFileSystem;
     _context    = default;
 }
コード例 #5
0
ファイル: CommitItemTest.cs プロジェクト: necora/ank_git
            public override CommitContext ShowCommitDialogModal(CommitContext ctx)
            {
                ctx.LogMessage = this.LogMessage;
                ctx.Cancelled = this.Cancelled;
                ctx.CommitItems = this.CommitItems;

                this.ShowCommitDialogModalCalled = true;

                return ctx;
            }
コード例 #6
0
 public SynchronisableCommitSteps(SynchronisableCommitContext context, CommitContext commitContext)
 {
     this.context       = context;
     this.commitContext = commitContext;
 }