public CompositeEntry(string pathList) { foreach (var path in pathList.Split(";")) { _entryList.Add(EntryFactory.GetEntry(path)); } }
/// <summary> /// 解析用户自定义的classpath /// </summary> /// <param name="classpathOption"></param> private void ParseUserClasspath(CommandLine commandLine) { if (string.IsNullOrEmpty(commandLine.UserClasspathInfo)) { commandLine.UserClasspathInfo = "."; } this.UserClasspath = EntryFactory.GetEntry(commandLine.UserClasspathInfo); }
protected override void OnParentSet() { base.OnParentSet(); if (BorderColor != null) { entry = EntryFactory.GetEntry(BorderColor); } Bind(); this.Children.Add(label); this.Children.Add(entry); }
/// <summary> /// Registers a concrete class type in the container /// </summary> /// <typeparam name="classType">The type to register</typeparam> /// <param name="entry">The container entry to be added</param> private void RegisterClassType(Type classType, LifestyleType lifestyleType) { // Abort if the lookupType is not a class if (!classType.IsClass) { throw new ArgumentException(string.Format("Expected lookup type of class, but received type of {0}", classType.ToString())); } lock (_registerLock) { if (!_entries.ContainsKey(classType)) { _entries.TryAdd(classType, EntryFactory.GetEntry(lifestyleType, classType)); } } }
public void TestGetTransientEntry() { IContainerEntry entry = EntryFactory.GetEntry(LifestyleType.Transient, typeof(ConnectionName)); Assert.NotNull(entry); }
public void TestGetSingletonEntry() { IContainerEntry entry = EntryFactory.GetEntry(LifestyleType.Singleton, typeof(ConnectionName)); Assert.NotNull(entry); }