Skip to content

Commit

Permalink
Update to latest packages.
Browse files Browse the repository at this point in the history
Move to U Texas LDAP server since other server seems to have been shut down.
  • Loading branch information
madhatter22 committed Sep 8, 2015
1 parent 4a0ad26 commit d3e5915
Show file tree
Hide file tree
Showing 58 changed files with 7,088 additions and 4,206 deletions.
10 changes: 5 additions & 5 deletions src/LinqToLdap.Examples.Models/LinqToLdap.Examples.Models.csproj
Expand Up @@ -32,13 +32,13 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="LinqToLdap, Version=3.3.1.0, Culture=neutral, PublicKeyToken=d4ffa016fc97ad84, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\LinqToLdap.3.3.1\lib\net40\LinqToLdap.dll</HintPath>
<Reference Include="LinqToLdap, Version=3.3.2.0, Culture=neutral, PublicKeyToken=d4ffa016fc97ad84, processorArchitecture=MSIL">
<HintPath>..\packages\LinqToLdap.4.0\lib\net40\LinqToLdap.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LinqToLdap.Contrib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d4ffa016fc97ad84, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\LinqToLdap.3.3.1\lib\net40\LinqToLdap.Contrib.dll</HintPath>
<HintPath>..\packages\LinqToLdap.4.0\lib\net40\LinqToLdap.Contrib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
10 changes: 7 additions & 3 deletions src/LinqToLdap.Examples.Models/User.cs
Expand Up @@ -2,7 +2,7 @@

namespace LinqToLdap.Examples.Models
{
[DirectorySchema("OU=users,DC=testathon,DC=net", ObjectClass = "inetOrgPerson")]
[DirectorySchema("dc=directory,dc=utexas,dc=edu", ObjectClass = "inetOrgPerson")]
public class User : DirectoryObject
{
[DirectoryAttribute("cn", ReadOnly = true)]
Expand All @@ -11,13 +11,17 @@ public class User : DirectoryObject
[DirectoryAttribute("uid", ReadOnly = true)]
public string UserId { get; set; }

[DirectoryAttribute("utexasedupersonprimarypubaffiliation", ReadOnly = true)]
public string PrimaryAffiliation { get; set; }

[DirectoryAttribute("givenname", ReadOnly = true)]
public string FirstName { get; set; }

[DirectoryAttribute("sn", ReadOnly = true)]
public string LastName { get; set; }

[DirectoryAttribute(ReadOnly = true)]
public string TelephoneNumber { get; set; }
[DirectoryAttribute]
public string[] ObjectClasses { get; set; }

}
}
2 changes: 1 addition & 1 deletion src/LinqToLdap.Examples.Models/packages.config
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LinqToLdap" version="3.3.1" targetFramework="net40" />
<package id="LinqToLdap" version="4.0" targetFramework="net4" />
</packages>
Expand Up @@ -37,38 +37,36 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="LinqToLdap, Version=3.3.1.0, Culture=neutral, PublicKeyToken=d4ffa016fc97ad84, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\LinqToLdap.3.3.1\lib\net45\LinqToLdap.dll</HintPath>
<Reference Include="LinqToLdap, Version=3.3.2.0, Culture=neutral, PublicKeyToken=d4ffa016fc97ad84, processorArchitecture=MSIL">
<HintPath>..\packages\LinqToLdap.4.0\lib\net45\LinqToLdap.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="LinqToLdap.Contrib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d4ffa016fc97ad84, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\LinqToLdap.3.3.1\lib\net45\LinqToLdap.Contrib.dll</HintPath>
<HintPath>..\packages\LinqToLdap.4.0\lib\net45\LinqToLdap.Contrib.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Moq, Version=4.2.1402.2112, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll</HintPath>
<Reference Include="Moq, Version=4.2.1507.118, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
<HintPath>..\packages\Moq.4.2.1507.0118\lib\net40\Moq.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.6.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="SharpTestsEx">
<HintPath>..\packages\SharpTestsEx.1.1.1\lib\SharpTestsEx.dll</HintPath>
</Reference>
<Reference Include="SharpTestsEx.Mvc">
<HintPath>..\packages\SharpTestsEx.1.1.1\lib\SharpTestsEx.Mvc.dll</HintPath>
<Reference Include="SharpTestsEx, Version=1.2.1.0, Culture=neutral, PublicKeyToken=8c60d8070630b1c1, processorArchitecture=MSIL">
<HintPath>..\packages\SharpTestsEx.1.2.1\lib\SharpTestsEx.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.DirectoryServices.Protocols" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.1.1\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Web.Http, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.1.1\lib\net45\System.Web.Http.dll</HintPath>
<Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<Choose>
Expand Down
10 changes: 5 additions & 5 deletions src/LinqToLdap.Examples.Mvc.Tests/UsersControllerTest.cs
Expand Up @@ -71,7 +71,7 @@ public void Get_Empty_Search_Returns_All_Results()
.Returns(list.AsQueryable());

//act
var results = _usersController.Get("", false) as UserListItem[];
var results = _usersController.Find("", false) as UserListItem[];

//assert
results.Should().Have.Count.EqualTo(1);
Expand All @@ -93,14 +93,14 @@ public void Get_Custom_Search_Returns_Results()
.Returns(mockQuery);

//act
var results = _usersController.Get("blah blah", true) as IEnumerable<object>;
var results = _usersController.Find("blah blah", true) as IEnumerable<object>;

//assert
results.Satisfy(x => x.Count() == 1 && ((UserListItem)x.First()).DistinguishedName == "test");
mockQuery.MockProvider.ExecutedExpressions[0].ToString()
.Should()
.Contain(
"FilterWith(\"(blah blah)\").Select(s => new UserListItem() {DistinguishedName = s.DistinguishedName, Name = Format(\"{0} {1}\", s.FirstName, s.LastName), UserId = s.UserId})");
"FilterWith(\"(blah blah)\").Select(s => new UserListItem() {DistinguishedName = s.DistinguishedName, Name = Format(\"{0} {1}\", s.FirstName, s.LastName), PrimaryAffiliation = s.PrimaryAffiliation, UserId = s.UserId})");
}

[TestMethod]
Expand All @@ -118,7 +118,7 @@ public void Get_Standard_Search_Two_Search_Terms_Returns_Correct_Results()
.Returns(list.AsQueryable());

//act
var results = _usersController.Get("john doe", false) as UserListItem[];
var results = _usersController.Find("john doe", false) as UserListItem[];

//assert
results.Satisfy(x => x.Count() == 1 && x.First().DistinguishedName == "test 4");
Expand All @@ -139,7 +139,7 @@ public void Get_Standard_Search_One_Search_Terms_Returns_Correct_Results()
.Returns(list.AsQueryable());

//act
var results = _usersController.Get("term", false) as UserListItem[];
var results = _usersController.Find("term", false) as UserListItem[];

//assert
results.Satisfy(
Expand Down
8 changes: 4 additions & 4 deletions src/LinqToLdap.Examples.Mvc.Tests/app.config
Expand Up @@ -12,23 +12,23 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="LinqToLdap" publicKeyToken="d4ffa016fc97ad84" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.0.0" newVersion="3.3.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.1.0.0" newVersion="5.1.0.0" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="SimpleInjector" publicKeyToken="984cb50dea722e99" culture="neutral" />
Expand Down
12 changes: 6 additions & 6 deletions src/LinqToLdap.Examples.Mvc.Tests/packages.config
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="LinqToLdap" version="3.3.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.1.1" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.1.1" targetFramework="net45" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.1" targetFramework="net45" />
<package id="SharpTestsEx" version="1.1.1" targetFramework="net45" />
<package id="LinqToLdap" version="4.0" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
<package id="Moq" version="4.2.1507.0118" targetFramework="net45" />
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
<package id="SharpTestsEx" version="1.2.1" targetFramework="net45" />
</packages>
Expand Up @@ -6,37 +6,37 @@

namespace LinqToLdap.Examples.Mvc
{
public sealed class SimpleInjectorWebApiDependencyResolver : IDependencyResolver
{
private readonly Container _container;
//public sealed class SimpleInjectorWebApiDependencyResolver : IDependencyResolver
//{
// private readonly Container _container;

public SimpleInjectorWebApiDependencyResolver(Container container)
{
this._container = container;
}
// public SimpleInjectorWebApiDependencyResolver(Container container)
// {
// this._container = container;
// }

[DebuggerStepThrough]
public IDependencyScope BeginScope()
{
return this;
}
// [DebuggerStepThrough]
// public IDependencyScope BeginScope()
// {
// return this;
// }

[DebuggerStepThrough]
public object GetService(Type serviceType)
{
return ((IServiceProvider)this._container)
.GetService(serviceType);
}
// [DebuggerStepThrough]
// public object GetService(Type serviceType)
// {
// return ((IServiceProvider)this._container)
// .GetService(serviceType);
// }

[DebuggerStepThrough]
public IEnumerable<object> GetServices(Type serviceType)
{
return this._container.GetAllInstances(serviceType);
}
// [DebuggerStepThrough]
// public IEnumerable<object> GetServices(Type serviceType)
// {
// return this._container.GetAllInstances(serviceType);
// }

[DebuggerStepThrough]
public void Dispose()
{
}
}
// [DebuggerStepThrough]
// public void Dispose()
// {
// }
//}
}
2 changes: 1 addition & 1 deletion src/LinqToLdap.Examples.Mvc/App_Start/WebApiConfig.cs
Expand Up @@ -11,7 +11,7 @@ public static void Register(HttpConfiguration config)
{
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
routeTemplate: "api/{controller}/{action}/{id}",
defaults: new { id = RouteParameter.Optional }
);
}
Expand Down

0 comments on commit d3e5915

Please sign in to comment.