internal GenericQueryRepositoryHelper(IGenericRepository <TEntity> repository, IncludeDefinition <TEntity> includeDefinition) { _repository = repository; _includeDefinitions = new List <IncludeDefinition <TEntity> > { includeDefinition }; }
public void CreatingIncludeDefinition_WithAllParameters_CreatesIncludeDefinition() { // Arrange // Act var actualIncludeDefinition = new IncludeDefinition("ShortName", "Version", "Culture", "PublicKeyToken", "ProcessorArchitecture"); // Assert Assert.That(actualIncludeDefinition, Is.Not.Null); }
private IncludeDefinition CreateIncludeDefinitionFromAttribute(XAttribute attribute) { var attributeValue = attribute.Value; var assemblyShortName = attributeValue.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries).First(); const string PossibleEndChars = "[,\"]"; var version = _stringParsingService.GetValueBetween(attributeValue, "Version=", PossibleEndChars); var publicKeyToken = _stringParsingService.GetValueBetween(attributeValue, "PublicKeyToken=", PossibleEndChars); var processorArchitecture = _stringParsingService.GetValueBetween(attributeValue, "processorArchitecture=", PossibleEndChars); var culture = _stringParsingService.GetValueBetween(attributeValue, "Culture=", PossibleEndChars); var result = new IncludeDefinition(assemblyShortName, version, culture, publicKeyToken, processorArchitecture); return(result); }
public IncludeDefinition CreateIncludeDefinition(string assemblyFileName) { var result = new IncludeDefinition(assemblyFileName, "1.0.0.0", "neutral", string.Empty, "MSIL"); return(result); }