mirror of
https://github.com/bitwarden/mobile
synced 2026-01-05 10:03:26 +00:00
get rid of old refection and memory services
This commit is contained in:
@@ -249,7 +249,6 @@ namespace Bit.iOS
|
||||
container.RegisterSingleton<IDeviceActionService, DeviceActionService>();
|
||||
container.RegisterSingleton<IAppIdService, AppIdService>();
|
||||
container.RegisterSingleton<IPasswordGenerationService, PasswordGenerationService>();
|
||||
container.RegisterSingleton<IReflectionService, ReflectionService>();
|
||||
container.RegisterSingleton<ILockService, LockService>();
|
||||
container.RegisterSingleton<IAppInfoService, AppInfoService>();
|
||||
container.RegisterSingleton<IGoogleAnalyticsService, GoogleAnalyticsService>();
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using Bit.App.Abstractions;
|
||||
using Bit.App.Controls;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.iOS.Services
|
||||
{
|
||||
public class ReflectionService : IReflectionService
|
||||
{
|
||||
public Func<double, double, SizeRequest> GetVisualElementOnSizeRequest(ExtendedTableView tableView)
|
||||
{
|
||||
var handle = typeof(VisualElement).GetMethod(
|
||||
"OnSizeRequest",
|
||||
BindingFlags.Instance | BindingFlags.NonPublic,
|
||||
null,
|
||||
new Type[] { typeof(double), typeof(double) },
|
||||
null)?.MethodHandle;
|
||||
|
||||
if(!handle.HasValue)
|
||||
{
|
||||
throw new ArgumentNullException("handle could not be found.");
|
||||
}
|
||||
|
||||
var pointer = handle.Value.GetFunctionPointer();
|
||||
if(pointer == null)
|
||||
{
|
||||
throw new ArgumentNullException("pointer could not be found.");
|
||||
}
|
||||
|
||||
return (Func<double, double, SizeRequest>)Activator.CreateInstance(typeof(Func<double, double, SizeRequest>), tableView, pointer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,6 @@
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<Compile Include="Services\iOSPushNotificationHandler.cs" />
|
||||
<Compile Include="Services\iOSPushNotificationService.cs" />
|
||||
<Compile Include="Services\ReflectionService.cs" />
|
||||
<None Include="Entitlements.plist" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
Reference in New Issue
Block a user