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

            _logReader          = new LocationLogReader(locationLogFileContents);
            _locationEnumerator = _logReader.GetLocations();
        }
示例#2
0
//#endif


        private void OnDestroy()
        {
            if (null != _locationEnumerator)
            {
                _locationEnumerator.Dispose();
                _locationEnumerator = null;
            }
            if (null != _logReader)
            {
                _logReader.Dispose();
                _logReader = null;
            }
        }
 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;
     }
 }
示例#4
0
//#if UNITY_EDITOR
        //protected override void Awake()
        protected override void Awake()
        {
            base.Awake();
            _logReader          = new LocationLogReader(_locationLogFile.bytes);
            _locationEnumerator = _logReader.GetLocations();
        }