qol: fix System.Net.Http dependencies
This commit is contained in:
@@ -53,7 +53,6 @@
|
|||||||
<Reference Include="System.DirectoryServices" />
|
<Reference Include="System.DirectoryServices" />
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Net.Http.Extensions, Version=2.2.22.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="System.Net.Http.Extensions, Version=2.2.22.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@@ -62,7 +61,6 @@
|
|||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
|
||||||
<Reference Include="System.Runtime.Serialization" />
|
<Reference Include="System.Runtime.Serialization" />
|
||||||
<Reference Include="System.ServiceModel" />
|
<Reference Include="System.ServiceModel" />
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
|
|||||||
@@ -65,16 +65,14 @@ namespace Disco.Models.Repository
|
|||||||
public AttachmentTypes HasAttachmentType { get { return AttachmentTypes.User; } }
|
public AttachmentTypes HasAttachmentType { get { return AttachmentTypes.User; } }
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
=> $"{DisplayName} ({UserId})";
|
||||||
return string.Format("{0} ({1})", this.DisplayName, this.UserId);
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool UpdateSelf(User u)
|
public bool UpdateSelf(User u)
|
||||||
{
|
{
|
||||||
var changed = false;
|
var changed = false;
|
||||||
|
|
||||||
if (!this.UserId.Equals(u.UserId, StringComparison.OrdinalIgnoreCase))
|
if (!this.UserId.Equals(u.UserId, StringComparison.OrdinalIgnoreCase))
|
||||||
throw new ArgumentException("User Id's do not match", "u");
|
throw new ArgumentException("User Id's do not match", nameof(u));
|
||||||
|
|
||||||
if (this.Surname != u.Surname)
|
if (this.Surname != u.Surname)
|
||||||
{
|
{
|
||||||
|
|||||||
-10
@@ -37,20 +37,10 @@
|
|||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.IO.Compression" />
|
<Reference Include="System.IO.Compression" />
|
||||||
<Reference Include="System.Net.Http.Extensions, Version=2.2.22.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Net.Http.Primitives, Version=4.2.22.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
|
||||||
<Private>True</Private>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -144,11 +144,28 @@ namespace Disco.Services.Plugins
|
|||||||
{
|
{
|
||||||
this.controllerDescription = controllerDescription;
|
this.controllerDescription = controllerDescription;
|
||||||
this.methodInfo = methodInfo;
|
this.methodInfo = methodInfo;
|
||||||
UniqueId = $"{ControllerDescriptor.UniqueId}_{methodName}";
|
|
||||||
ActionName = methodName;
|
|
||||||
authorizationFilters = DiscoverAuthorizationFilters();
|
authorizationFilters = DiscoverAuthorizationFilters();
|
||||||
methodSelector = DiscoverMethodSelector();
|
methodSelector = DiscoverMethodSelector();
|
||||||
parameterDescriptors = DiscoverParameters();
|
parameterDescriptors = DiscoverParameters();
|
||||||
|
|
||||||
|
switch (methodSelector)
|
||||||
|
{
|
||||||
|
case HttpPostAttribute _:
|
||||||
|
methodName += ":POST";
|
||||||
|
break;
|
||||||
|
case HttpGetAttribute _:
|
||||||
|
methodName += ":GET";
|
||||||
|
break;
|
||||||
|
case HttpPutAttribute _:
|
||||||
|
methodName += ":PUT";
|
||||||
|
break;
|
||||||
|
case HttpDeleteAttribute _:
|
||||||
|
methodName += ":DELETE";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ActionName = methodName;
|
||||||
|
UniqueId = $"{ControllerDescriptor.UniqueId}_{methodName}";
|
||||||
}
|
}
|
||||||
|
|
||||||
private IAuthorizationFilter[] DiscoverAuthorizationFilters()
|
private IAuthorizationFilter[] DiscoverAuthorizationFilters()
|
||||||
@@ -311,14 +328,19 @@ namespace Disco.Services.Plugins
|
|||||||
var methods = Array.FindAll(ControllerType.GetMethods(BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), mi => { return !mi.IsSpecialName && typeof(ActionResult).IsAssignableFrom(mi.ReturnType); });
|
var methods = Array.FindAll(ControllerType.GetMethods(BindingFlags.InvokeMethod | BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly), mi => { return !mi.IsSpecialName && typeof(ActionResult).IsAssignableFrom(mi.ReturnType); });
|
||||||
foreach (var method in methods)
|
foreach (var method in methods)
|
||||||
{
|
{
|
||||||
actions.Add(method.Name, new PluginActionDescriptor(this, method.Name, method));
|
var descriptor = new PluginActionDescriptor(this, method.Name, method);
|
||||||
|
actions.Add(descriptor.ActionName, descriptor);
|
||||||
}
|
}
|
||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override ActionDescriptor FindAction(ControllerContext controllerContext, string actionName)
|
public override ActionDescriptor FindAction(ControllerContext controllerContext, string actionName)
|
||||||
{
|
{
|
||||||
if (actions.TryGetValue(actionName, out var action))
|
var method = controllerContext.HttpContext.Request.HttpMethod.ToUpperInvariant();
|
||||||
|
|
||||||
|
if (actions.TryGetValue($"{actionName}:{method}", out var action))
|
||||||
|
return action;
|
||||||
|
if (actions.TryGetValue(actionName, out action))
|
||||||
return action;
|
return action;
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -50,14 +50,12 @@
|
|||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Data.Entity" />
|
<Reference Include="System.Data.Entity" />
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Net.Http.Extensions">
|
<Reference Include="System.Net.Http.Extensions">
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Extensions.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.Primitives">
|
<Reference Include="System.Net.Http.Primitives">
|
||||||
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Net.Http.2.2.22\lib\net45\System.Net.Http.Primitives.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http.WebRequest" />
|
|
||||||
<Reference Include="System.Web" />
|
<Reference Include="System.Web" />
|
||||||
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
@* Generator: WebPagesHelper *@
|
@* Generator: WebPagesHelper *@
|
||||||
@using Disco;
|
@using Disco;
|
||||||
@using Disco.BI.Extensions;
|
|
||||||
@using Disco.Models.Repository;
|
@using Disco.Models.Repository;
|
||||||
@using Disco.Services;
|
@using Disco.Services;
|
||||||
@using Disco.Services.Web;
|
@using Disco.Services.Web;
|
||||||
@@ -112,10 +111,13 @@
|
|||||||
itemNextId++;
|
itemNextId++;
|
||||||
var itemId = forceUniqueIds.HasValue ? string.Format("{0}_{1}_{2}", id, item.Value, forceUniqueIds++) : string.Format("{0}_{1}", id, item.Value);
|
var itemId = forceUniqueIds.HasValue ? string.Format("{0}_{1}_{2}", id, item.Value, forceUniqueIds++) : string.Format("{0}_{1}", id, item.Value);
|
||||||
<li>
|
<li>
|
||||||
<input id="@itemId" name="@id" value="@item.Value" type="@inputType" @(item.Selected ? new HtmlString("checked=\"checked\" ") : null)/><label for="@itemId">@if (htmlEncodeText)
|
<input id="@itemId" name="@id" value="@item.Value" type="@inputType" @(item.Selected ? new HtmlString("checked=\"checked\" ") : null) /><label for="@itemId">
|
||||||
|
@if (htmlEncodeText)
|
||||||
{@item.Text }
|
{@item.Text }
|
||||||
else
|
else
|
||||||
{ @(new HtmlString(item.Text)) }</label></li>
|
{ @(new HtmlString(item.Text))}
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -137,7 +139,7 @@
|
|||||||
}
|
}
|
||||||
if (breadCrumb.Item2 == null)
|
if (breadCrumb.Item2 == null)
|
||||||
{
|
{
|
||||||
@breadCrumb.Item1
|
<span title="@breadCrumb.Item1">@breadCrumb.Item1</span>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -183,10 +183,6 @@
|
|||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Net.Http">
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Net.Http.WebRequest">
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml.Linq" />
|
<Reference Include="System.Xml.Linq" />
|
||||||
<Reference Include="T4MVCExtensions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
|
<Reference Include="T4MVCExtensions, Version=3.0.0.0, Culture=neutral, PublicKeyToken=7b26dc2a43f6a0d4, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\T4MVCExtensions.3.17.5\lib\net40\T4MVCExtensions.dll</HintPath>
|
<HintPath>..\packages\T4MVCExtensions.3.17.5\lib\net40\T4MVCExtensions.dll</HintPath>
|
||||||
|
|||||||
Reference in New Issue
Block a user