Beispiel #1
0
 public Version(Guid versionId, DeviceOs os, int versionNumber)
 {
     VersionId     = versionId;
     Os            = os;
     VersionNumber = versionNumber;
     Active        = true;
     DateCreated   = DateTime.Now;
 }
Beispiel #2
0
        public Token(Guid tokenId, Guid userToken, DeviceOs deviceOs)
        {
            TokenId   = tokenId;
            UserToken = userToken;
            DeviceOs  = deviceOs;

            Person      = null;
            Active      = true;
            DateCreated = DateTime.Now;
        }
        public override int GetHashCode()
        {
            int hash = 1;

            if (ClientVersion.Length != 0)
            {
                hash ^= ClientVersion.GetHashCode();
            }
            if (DeviceType.Length != 0)
            {
                hash ^= DeviceType.GetHashCode();
            }
            if (FirstTime != false)
            {
                hash ^= FirstTime.GetHashCode();
            }
            if (LoadToTosLoginTime != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LoadToTosLoginTime);
            }
            if (LoadToMapTime != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(LoadToMapTime);
            }
            if (DeviceOs.Length != 0)
            {
                hash ^= DeviceOs.GetHashCode();
            }
            if (GraphicsDeviceVendor.Length != 0)
            {
                hash ^= GraphicsDeviceVendor.GetHashCode();
            }
            if (GraphicsDeviceName.Length != 0)
            {
                hash ^= GraphicsDeviceName.GetHashCode();
            }
            if (GraphicsDeviceType.Length != 0)
            {
                hash ^= GraphicsDeviceType.GetHashCode();
            }
            if (GraphicsShaderLevel != 0D)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(GraphicsShaderLevel);
            }
            hash ^= subsystemLoadTimes_.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Beispiel #4
0
 public Device(Guid deviceId, string description, string deviceToken, string pushToken, string simCardNumber, DeviceOs deviceOs, string identification, Person person)
 {
     DeviceId       = deviceId;
     Description    = description;
     DeviceToken    = deviceToken;
     PushToken      = pushToken;
     SimCardNumber  = simCardNumber;
     Identification = identification;
     DeviceOs       = deviceOs;
     DeviceStatus   = DeviceStatus.Active;
     Person         = person;
     Active         = true;
     DateCreated    = DateTime.Now;
 }
        GetMinimumVersionCommandResult IVersionRepository.GetByOs(DeviceOs os)
        {
            GetMinimumVersionCommandResult version = new GetMinimumVersionCommandResult()
            {
                MinimumVersion = 0
            };

            if (os == DeviceOs.iOS)
            {
                version = new GetMinimumVersionCommandResult()
                {
                    MinimumVersion = 1
                };
            }
            else if (os == DeviceOs.Android)
            {
                version = new GetMinimumVersionCommandResult()
                {
                    MinimumVersion = 2
                };
            }

            return(version);
        }
 public DeviceConfiguration(DeviceOs deviceOs, bool isMobile, bool isTabletOrTouchEnabled)
 {
     DeviceOs = deviceOs;
     IsMobile = isMobile;
     IsTabletOrTouchEnabled = isTabletOrTouchEnabled;
 }
        public IHttpActionResult GetByOs(int os)
        {
            GetMinimumVersionCommandResult result = _versionRepository.GetByOs(DeviceOs.FromValue(os));

            return(Response(result));
        }
 public DeviceBuilder WithDeviceOs(DeviceOs os)
 {
     this._os = os;
     return(this);
 }