예제 #1
0
        static void Main(string[] args)
        {
            string filePath      = Environment.ExpandEnvironmentVariables(UserSettings.Default.ProfileFileLocation);
            string directoryPath = Path.GetDirectoryName(filePath);

            if (!Directory.Exists(directoryPath))
            {
                Directory.CreateDirectory(directoryPath);
            }

            IProfileStore store = new StreamProfileStore(
                new FileStream(filePath, FileMode.OpenOrCreate),
                new XMLProfileEncoder());

            _handler.RegisterResource <IProfileStore>(store)
            .RegisterTypeConverter <IPAddress>(s => IPAddress.Parse(s))
            .RegisterResource <IProfileApplier>(new ProfileApplier())
            .RegisterResource <IUserSettings>(new DefaultUserSettings());

            _handler.Handle(args);
        }
예제 #2
0
 static void Main(string[] args)
 {
     CLImberConfig();
     _handler.Handle(args);
 }
예제 #3
0
        public void Handle_ShouldFindClassesInAssembly_WhenDecoratedWithCommandClass()
        {
            string[] arguments = { "test_command" };

            _sut.Handle(arguments);

            DummyCommand.CallCount.Should().Be(1);
        }