// // 1. Enumerate (dir/ls) // private bool Enumerate(Object obj) { bool dir = ((FLAGS & (byte)Iso9660FileFlags.Directory) != 0); NodeType nodeType = (dir)? NodeType.Directory: NodeType.File; ((SortedList)obj).Add(NAME.ToLower(), nodeType); // FIXME: ToLower opt? return(false); // GetNextChild }
public bool Match(WSValue value) { try { return(value != null && (ALIACES.Any(x => value.ALIACES.Any(v => x.Equals(v))) || value.NAME.ToLower().Equals(NAME.ToLower()))); } catch (Exception) { } return(false); }
public void TestMethod6() { string file = File.ReadAllText(@"TestFiles\Test1.html"); const string KEY = "button"; const string NAME = "Dish"; const string SECOND_NAME = "CompleteDish"; const string CLASS_NAME = "DishCreator"; ComponentsContainer basicComponentsContainer = ComponentsContainer.Instance; ComponentsFactory factory = new ComponentsFactory(basicComponentsContainer, basicComponentsContainer, basicComponentsContainer, basicComponentsContainer); Mock <IComponentAddin> addin = new Mock <IComponentAddin>(); addin.Setup(add => add.AddinKey).Returns(KEY); addin.Setup(add => add.GenerateHelpers(CLASS_NAME, NAME, It.IsAny <IPropertyGenerator>())).Returns(new[] { $"{CLASS_NAME} With{NAME}(string {NAME.ToLower()}){{}}" }); addin.Setup(add => add.GenerateHelpers(CLASS_NAME, SECOND_NAME, It.IsAny <IPropertyGenerator>())).Returns(new[] { $"{CLASS_NAME} {SECOND_NAME}(){{}}" }); addin.Setup(add => add.Type).Returns(Consts.WEB_ELEMENT_CLASS_NAME); basicComponentsContainer.AddAddin(addin.Object); var files = factory.CreateCsOutput(file); Directory.CreateDirectory(NamespaceFileConverter.ConvertNamespaceToFilePath(Consts.PAGES_NAMESPACE)); Directory.CreateDirectory(NamespaceFileConverter.ConvertNamespaceToFilePath(Consts.COMPONENTS_NAMESPACE)); foreach (ComponentGeneratorOutput innerFile in files) { File.WriteAllText(innerFile.CsFilePath, innerFile.Body); } }
public bool Match(string value) { try { value = value == null ? null : value.ToLower(); return(isValid && value != null && (ALIACES.Any(x => value.Equals(x)) || NAME.ToLower().Equals(value))); } catch (Exception) { return(false); } }