Permalink
Switch branches/tags
tag-test3 tag-test2 tag-test1 rui-3.0.0 release-3.3.0-rc0 release-3.2.0 release-3.2.0-sr1 release-3.1.0-sr3 release-3.1.0-sr2 release-3.1.0-sr1.1 release-3.1.0-sr1 release-3.1.0-rc1 release-3.0.0-sr4.1 release-3.0.0-sr4 release-3.0.0-sr3 release-3.0.0-sr2 release-3.0.0-sr1 release-3.0.0-rc2 release-3.0.0-rc1 release-2.5.1 release-2.5.1-sr4 release-2.5.1-sr3 release-2.5.1-sr2 release-2.5.1-sr1 release-2.5.0 release-2.5.0-sr5 release-2.5.0-sr4 release-2.5.0-sr3 release-2.5.0-sr2 release-2.5.0-sr1 release-2.4.99-rc1 release-2.4.0 release-2.4.0-sr6 release-2.4.0-sr5 release-2.4.0-sr4 release-2.4.0-sr3 release-2.4.0-sr2 release-2.4.0-sr1 release-2.4.0-rc2 release-2.3.5 release-2.3.4 release-2.3.4-sr6 release-2.3.4-sr5 release-2.3.4-sr4 release-2.3.4-sr3 release-2.3.4-sr2 release-2.3.4-sr1 release-2.3.3 release-2.3.3-sr2 release-2.3.3-sr1.1 release-2.3.3-sr1 release-2.3.3-hf1 release-2.3.2 release-2.3.2-hf1 release-2.3.1 release-2.3.0 release-2.3.0-hf1 release-2.2.0 release-2.2.0-hf1 beta-cycle6buildtest beta-9.99.99-rui beta-9.9.999-rui beta-9.9.99-rui beta-9.9.15.5-rui beta-9.9.9.9-rui beta-9.9.9-rui beta-9.9.8-rui beta-3.4.0-pre1 beta-3.3.0-pre3 beta-3.3.0-pre2 beta-3.3.0-pre1 beta-3.2.0-pre3 beta-3.2.0-pre2 beta-3.2.0-pre1.1 beta-3.2.0-pre1 beta-3.1.0-pre4.1 beta-3.1.0-pre4 beta-3.1.0-pre3 beta-3.1.0-pre2.3 beta-3.1.0-pre2.2 beta-3.1.0-pre2 beta-3.1.0-pre1.2 beta-3.1.0-pre1 beta-3.0.0-rui beta-3.0.0-pre4.4 beta-3.0.0-pre4.3 beta-3.0.0-pre4.2 beta-3.0.0-pre4.1 beta-3.0.0-pre4 beta-3.0.0-pre3 beta-3.0.0-pre2.2 beta-3.0.0-pre2 beta-3.0.0-pre1.2 beta-3.0.0-pre1 beta-2.5.1-pre3 beta-2.5.1-pre2 beta-2.5.1-pre1 beta-2.5.0-pre3 beta-2.5.0-pre2 beta-2.5.0-pre1
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
51 lines (41 sloc) 1.12 KB
using System;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace Xamarin.Forms.Internals
{
[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class DeviceInfo : INotifyPropertyChanged, IDisposable
{
DeviceOrientation _currentOrientation;
bool _disposed;
public DeviceOrientation CurrentOrientation
{
get { return _currentOrientation; }
set
{
if (Equals(_currentOrientation, value))
return;
_currentOrientation = value;
OnPropertyChanged();
}
}
public virtual double DisplayRound(double value) =>
Math.Round(value);
public abstract Size PixelScreenSize { get; }
public abstract Size ScaledScreenSize { get; }
public abstract double ScalingFactor { get; }
public void Dispose()
{
Dispose(true);
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void Dispose(bool disposing)
{
if (_disposed)
return;
_disposed = true;
}
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}