Ejemplo n.º 1
0
        public MapboxLocationServiceMock(byte[] locationLogFileContents)
        {
            if (null == locationLogFileContents || locationLogFileContents.Length < 1)
            {
                throw new ArgumentNullException("locationLogFileContents");
            }

            _logReader          = new LocationLogReader(locationLogFileContents);
            _locationEnumerator = _logReader.GetLocations();
        }
Ejemplo n.º 2
0
//#endif


        private void OnDestroy()
        {
            if (null != _locationEnumerator)
            {
                _locationEnumerator.Dispose();
                _locationEnumerator = null;
            }
            if (null != _logReader)
            {
                _logReader.Dispose();
                _logReader = null;
            }
        }
Ejemplo n.º 3
0
 protected virtual void Dispose(bool disposeManagedResources)
 {
     if (!_disposed)
     {
         if (disposeManagedResources)
         {
             if (null != _locationEnumerator)
             {
                 _locationEnumerator.Dispose();
                 _locationEnumerator = null;
             }
             if (null != _logReader)
             {
                 _logReader.Dispose();
                 _logReader = null;
             }
         }
         _disposed = true;
     }
 }
Ejemplo n.º 4
0
//#if UNITY_EDITOR
        //protected override void Awake()
        protected override void Awake()
        {
            base.Awake();
            _logReader          = new LocationLogReader(_locationLogFile.bytes);
            _locationEnumerator = _logReader.GetLocations();
        }