Ejemplo n.º 1
0
        FileConflictResolution RaiseResolveFileConflict(string message)
        {
            var eventArgs = new ResolveFileConflictEventArgs(message);

            fakeEvents.Raise(events => events.ResolveFileConflict += null, fakeEvents, eventArgs);
            return(eventArgs.Resolution);
        }
Ejemplo n.º 2
0
        public void OnResolveFileConflict_OneEventSubscriberWhichDoesNotChangeEventArgs_EventArgsHasFileConflictResolutionOfIgnore()
        {
            CreateEvents();
            ResolveFileConflictEventArgs eventArgs = null;

            events.ResolveFileConflict += (sender, e) => eventArgs = e;
            events.OnResolveFileConflict("message");

            Assert.AreEqual(FileConflictResolution.Ignore, eventArgs.Resolution);
        }
Ejemplo n.º 3
0
        public void OnResolveFileConflict_OneEventSubscriber_MessageAddedToEventArgs()
        {
            CreateEvents();
            ResolveFileConflictEventArgs eventArgs = null;

            events.ResolveFileConflict += (sender, e) => eventArgs = e;
            events.OnResolveFileConflict("message");

            Assert.AreEqual("message", eventArgs.Message);
        }
		void ResolveFileConflict(object sender, ResolveFileConflictEventArgs e)
		{
			if (UserPreviouslySelectedOverwriteAllOrIgnoreAll ()) {
				e.Resolution = lastFileConflictResolution;
			} else {
				GuiSyncDispatch (() => {
					e.Resolution = fileConflictResolver.ResolveFileConflict (e.Message);
				});
				lastFileConflictResolution = e.Resolution;
			}
		}
 void ResolveFileConflict(object sender, ResolveFileConflictEventArgs e)
 {
     if (conflictResolution.HasValue)
     {
         e.Resolution = conflictResolution.Value;
     }
     else
     {
         Runtime.RunInMainThread(() => {
             e.Resolution = fileConflictResolver.ResolveFileConflict(e.Message);
         }).Wait();
     }
 }
 void ResolveFileConflict(object sender, ResolveFileConflictEventArgs e)
 {
     e.Resolution = conflictResolution;
 }
		void RaiseResolveFileConflictEventIfHasSubscribers (object sender, ResolveFileConflictEventArgs e)
		{
			if (ResolveFileConflict != null) {
				guiSyncDispatcher (() => ResolveFileConflict (sender, e));
			}
		}
		public FileConflictResolution OnResolveFileConflict(string message)
		{
			if (ResolveFileConflict != null) {
				var eventArgs = new ResolveFileConflictEventArgs(message);
				ResolveFileConflict(this, eventArgs);
				return eventArgs.Resolution;
			}
			return FileConflictResolution.IgnoreAll;
		}
		void ResolveFileConflict (object sender, ResolveFileConflictEventArgs e)
		{
			e.Resolution = conflictResolution;
		}