예제 #1
0
파일: SqlChars.cs 프로젝트: nlhepler/mono
		public SqlChars (SqlString value)
		{
			if (value.IsNull) {
				notNull = false;
				buffer = null;
			} else {
				notNull = true;
				buffer = value.Value.ToCharArray ();
				storage = StorageState.Buffer;
			}
		}
예제 #2
0
파일: SqlChars.cs 프로젝트: nlhepler/mono
		public SqlChars (char[] buffer)
		{
			if (buffer == null) {
				notNull = false;
				this.buffer = null;
			} else {
				notNull = true;
				this.buffer = buffer;
				storage = StorageState.Buffer;
			}
		}
예제 #3
0
파일: SqlBytes.cs 프로젝트: nlhepler/mono
		public SqlBytes (byte[] buffer)
		{
			if (buffer == null) {
				notNull = false;
				buffer = null;
			}
			else {
				notNull = true;
				this.buffer = buffer;
				storage = StorageState.Buffer;
			}
		}
예제 #4
0
 public SqlBytes(SqlBinary value)
 {
     if (value.IsNull)
     {
         this.notNull = false;
         this.buffer = null;
     }
     else
     {
         this.notNull = true;
         this.buffer = value.Value;
         this.storage = StorageState.Buffer;
     }
 }
예제 #5
0
        public void Update(GameTime gameTime)
        {
            try
            {
                sdIndicator.Update(gameTime);

                switch (state)
                {
                case StorageState.CheckAvailableSpace:
                    checkAvailableSpace();
                    break;

                case StorageState.ReadyCheckAvailableSpace:
                    readyCheckAvailableSpace();
                    break;

                case StorageState.ReadyFirstPass:
                    refreshSaveGameDescriptions();
                    isFirstPassDone = true;
                    state           = StorageState.Idle;
                    break;

                case StorageState.ReadyToSave:
                    saveGame();
                    RefreshSaveGameDescriptions();
                    break;

                case StorageState.ReadyToLoad:
                    loadGame();
                    state = StorageState.Idle;
                    break;

                case StorageState.ReadyToDelete:
                    deleteGame();
                    RefreshSaveGameDescriptions();
                    break;

                case StorageState.ReadyToRefreshSaveGames:
                    refreshSaveGameDescriptions();
                    state = StorageState.Idle;
                    break;
                }
            }
            catch (Exception)
            {
//                Debug.WriteLine($"Exception {e}");
            }
        }
예제 #6
0
 public SqlBytes(Stream s)
 {
     if (s == null)
     {
         this.notNull = false;
         this.buffer  = null;
     }
     else
     {
         this.notNull = true;
         var len = (int)s.Length;
         this.buffer = new byte[len];
         s.Read(this.buffer, 0, len);
         this.storage = StorageState.Stream;
         this.Stream  = s;
     }
 }
예제 #7
0
 /// <inheritdoc/>
 public new async Task <IChromiumBrowserContext> NewContextAsync(
     ViewportSize viewport,
     string userAgent                = null,
     bool?bypassCSP                  = null,
     bool?javaScriptEnabled          = null,
     string timezoneId               = null,
     Geolocation geolocation         = null,
     ContextPermission[] permissions = null,
     bool?isMobile               = null,
     bool?offline                = null,
     decimal?deviceScaleFactor   = null,
     Credentials httpCredentials = null,
     bool?hasTouch               = null,
     bool?acceptDownloads        = null,
     bool?ignoreHTTPSErrors      = null,
     ColorScheme?colorScheme     = null,
     string locale               = null,
     Dictionary <string, string> extraHTTPHeaders = null,
     RecordHarOptions recordHar     = null,
     RecordVideoOptions recordVideo = null,
     ProxySettings proxy            = null,
     string storageStatePath        = null,
     StorageState storageState      = null)
 => await base.NewContextAsync(
     viewport,
     userAgent,
     bypassCSP,
     javaScriptEnabled,
     timezoneId,
     geolocation,
     permissions,
     isMobile,
     offline,
     deviceScaleFactor,
     httpCredentials,
     hasTouch,
     acceptDownloads,
     ignoreHTTPSErrors,
     colorScheme,
     locale,
     extraHTTPHeaders,
     recordHar,
     recordVideo,
     proxy,
     storageStatePath,
     storageState).ConfigureAwait(false) as IChromiumBrowserContext;
 public SqlBytes(Stream s)
 {
     if (s == null)
     {
         notNull = false;
         buffer  = null;
     }
     else
     {
         notNull = true;
         int len = (int)s.Length;
         buffer = new byte [len];
         s.Read(buffer, 0, len);
         storage = StorageState.Stream;
         stream  = s;
     }
 }
예제 #9
0
        public ZedGraphForm(List <double[]> argData)
        {
            InitializeComponent();

            _nowState = StorageState.List;
            for (int i = 0; i < argData.Count; i++)
            {
                comboBoxDataSelect.Items.Add(string.Format("Data Set: {0:D}", i));
            }
            _dataList                = argData;
            _myPane                  = zedGraphTable.GraphPane;
            _myPane.Title.Text       = "X - Y";
            _myPane.XAxis.Title.Text = "Point";
            _myPane.YAxis.Title.Text = "Value";
            if (comboBoxDataSelect.Items.Count == 1)
            {
                comboBoxDataSelect.SelectedIndex = 0;
            }
        }
예제 #10
0
        /// <inheritdoc />
        public async Task Shutdown()
        {
            this.currentState = StorageState.NotInitialized;

            try
            {
                if (!(this.databaseProvider is null))
                {
                    await this.databaseProvider.Flush();

                    this.databaseProvider.Dispose();
                    this.databaseProvider = null;
                }
            }
            catch (Exception e)
            {
                this.logService.LogException(e);
            }
        }
예제 #11
0
    public void Change_state(StorageState _newState)
    {
        if (currentState != _newState)
        {
            taskStep     = 0;
            currentState = _newState;
            //Debug.Log(storageName + ": " + currentState);
            switch (currentState)
            {
            case StorageState.IDLE:
                // grab chassis / part if a request is pending
                if (current_CHASSIS_request != null)
                {
                    Request_chassis(current_CHASSIS_request);
                }
                else if (current_PART_request != null)
                {
                    Request_part(current_PART_request);
                }
                else if (next_CHASSIS_request != null)
                {
                    Debug.Log(storageName + " found NEXT CHASSIS req");
                    current_CHASSIS_request = next_CHASSIS_request;
                    next_CHASSIS_request    = null;
                    Request_chassis(current_CHASSIS_request);
                }
                else if (next_PART_request != null)
                {
                    current_PART_request = next_PART_request;
                    next_PART_request    = null;
                    Request_part(current_PART_request);
                }

                break;

            case StorageState.WAITING:
                break;

            case StorageState.FETCHING:
                break;
            }
        }
    }
예제 #12
0
        void IXmlSerializable.ReadXml(XmlReader reader)
        {
            if (reader == null)
            {
                return;
            }

            switch (reader.ReadState)
            {
            case ReadState.EndOfFile:
            case ReadState.Error:
            case ReadState.Closed:
                return;
            }
            // Skip XML declaration and prolog
            // or do I need to validate for the <string> tag?
            reader.MoveToContent();
            if (reader.EOF)
            {
                return;
            }

            reader.Read();
            if (reader.NodeType == XmlNodeType.EndElement)
            {
                return;
            }

            if (reader.Value.Length > 0)
            {
                if (String.Compare("Null", reader.Value) == 0)
                {
                    // means a null reference/invalid value
                    notNull = false;
                    return;
                }
                // FIXME: Validate the value for expected format
                this.buffer  = reader.Value.ToCharArray();
                this.notNull = true;
                this.storage = StorageState.Buffer;
            }
        }
        void SetupUserStoragePreferences()
        {
            StorageState storageState = AppConfig.SharedAppConfiguration.StorageState;

            if (storageState.AccountDidChange)
            {
                NotifyUserOfAccountChange();
            }

            if (storageState.CloudAvailable)
            {
                if (storageState.StorageOption == StorageType.NotSet)
                {
                    PromptUserForStorageOption();
                }
            }
            else
            {
                AppConfig.SharedAppConfiguration.StorageOption = StorageType.NotSet;
                NeedCloudAlert();
            }
        }
예제 #14
0
파일: Source.cs 프로젝트: mititch/Searcher
        //
        // methods
        //

        /// <summary>
        /// Prepere source to use
        /// </summary>
        /// <returns></returns>
        public Boolean PrepareSource()
        {
            // Only one thread can enter
            if (Interlocked.Exchange(ref this.u_lock, 1) == 0)
            {
                // Fill source
                try
                {
                    // Fill storage with file data
                    this.Fill(this.filename);
                    // Set instance state to ready
                    this.state = StorageState.Ready;
                }
                catch (Exception exception)
                {
                    // Set instance state to broken
                    this.state = StorageState.Broken;
                    throw NewParsingFileException(exception);
                }
                finally
                {
                    // Release lock
                    this.c_lock.Set();
                }
            }
            else
            {
                // Lock other threads
                c_lock.WaitOne();
                // Throw exception if storage state was broken during lock
                if (this.state == StorageState.Broken)
                {
                    throw NewParsingFileException(null);
                }
            }

            return(this.State == StorageState.Ready);
        }
예제 #15
0
        private void Start()
        {
            renderer = GetComponent <SpriteRenderer>();
            block    = GetComponent <Block>();
            if (block.ParentShipComponent.Id == 13)
            {
            }

            if (block.ParentShipComponent.Id == 14)
            {
                if (block.ParentShipComponent.Blocks[new Vector2Int(0, 0)] == block)
                {
                    state = StorageState.TL;
                }
                if (block.ParentShipComponent.Blocks[new Vector2Int(1, 0)] == block)
                {
                    state = StorageState.TR;
                }
            }

            if (block.ParentShipComponent.Id == 15)
            {
                if (block.ParentShipComponent.Blocks[new Vector2Int(0, 0)] == block)
                {
                    state = StorageState.THL;
                }
                if (block.ParentShipComponent.Blocks[new Vector2Int(1, 0)] == block)
                {
                    state = StorageState.THM;
                }
                if (block.ParentShipComponent.Blocks[new Vector2Int(2, 0)] == block)
                {
                    state = StorageState.THR;
                }
            }

            renderer.sprite = StorageSprites[(int)state];
        }
예제 #16
0
        /// <summary>
        /// CreateStorage method inserts a new record in Storage table and a note if such exists
        /// </summary>
        /// <param name="storageObject"></param>
        /// <param name="userId"></param>
        /// <returns>int</returns>
        public int CreateStorage(int userId, StorageObject storageObject)
        {
            //define method execution return value to be false by default
            int retMthdExecResult = 0;
            int distillerId       = _dl.GetDistillerId(userId);

            if (storageObject != null)
            {
                try
                {
                    Storage storRec = new Storage();
                    storRec.Name         = storageObject.StorageName;
                    storRec.SerialNumber = storageObject.SerialNumber;
                    storRec.Capacity     = storageObject.Capacity;
                    storRec.DistillerID  = distillerId;
                    if (storageObject.Note != string.Empty && storageObject.Note != null)
                    {
                        storRec.Note = storageObject.Note;
                    }
                    _db.Storage.Add(storRec);
                    _db.SaveChanges();

                    StorageState storState = new StorageState();
                    storState.StorageID = storRec.StorageID;
                    storState.Available = true;
                    _db.StorageState.Add(storState);
                    _db.SaveChanges();
                    retMthdExecResult = storRec.StorageID;
                }
                catch (Exception e)
                {
                    retMthdExecResult = 0;
                }
            }

            return(retMthdExecResult);
        }
예제 #17
0
        public ZedGraphForm(double[] argData)
        {
            InitializeComponent();
            double[,] newData = new double[1, argData.Length];
            for (int i = 0; i < argData.Length; i++)
            {
                newData[0, i] = argData[i];
            }

            _nowState = StorageState.Array;
            for (int i = 0; i < newData.GetLength(0); i++)
            {
                comboBoxDataSelect.Items.Add(string.Format("Data Set: {0:D}", i));
            }
            _dataArray               = newData;
            _myPane                  = zedGraphTable.GraphPane;
            _myPane.Title.Text       = "X - Y";
            _myPane.XAxis.Title.Text = "Point";
            _myPane.YAxis.Title.Text = "Value";
            if (comboBoxDataSelect.Items.Count == 1)
            {
                comboBoxDataSelect.SelectedIndex = 0;
            }
        }
예제 #18
0
		public Compaction(StorageState storageContext, int level, Version inputVersion = null)
		{
			this.storageContext = storageContext;
			Level = level;
			MaxOutputFileSize = CalculateMaxOutputFileSize(level);
			this.inputVersion = inputVersion;
			Edit = new VersionEdit();
			Inputs = new[]
			    {
			        new List<FileMetadata>(), 
                    new List<FileMetadata>()
			    };
			Grandparents = new List<FileMetadata>();
			grandparentIndex = 0;
			seenKey = false;
			overlappedBytes = 0;

			levelPointers = new int[Config.NumberOfLevels];

			for (int lvl = 0; lvl < Config.NumberOfLevels; lvl++)
			{
				levelPointers[lvl] = 0;
			}
		}
예제 #19
0
 private void ChangeState(StorageState state)
 {
     guiViewModel.BusyIndicator = state;
     guiViewModel.OnPropertyChanged(nameof(GuiViewModel.BusyIndicator));
     guiViewModel.InvokeInvalidateVisual();
 }
예제 #20
0
	void createStorage (StorageState state)
	{
		Debug.Log("createStorage (StorageState "+state+")");

		if(selectPanel == mainObj.transform.FindChild ("_PDrawble_" + (int)state).gameObject)
			return;

		if (state == StorageState.NONE)
			return;

		if (_List != null) {
			foreach (GameObject obj in _List) {
				DestroyObject (obj);
			}
			_List.Clear ();
		}

		//bool bItemBtn = false;

		m_state = state;
		prefab = Resources.Load ("prefabs/_PShopToolsBox") as GameObject;

		selectPanel = mainObj.transform.FindChild ("_PDrawble_" + (int)state).gameObject;
		
		switch (m_state) {
		case StorageState.TREASURE_BOX:
			itemTotalCount = equip_count;
			break;
		case StorageState.EQUIL:
			itemTotalCount = tools_count;
			break;
		case StorageState.TOOLS:
			itemTotalCount = boxs_count;
			break;
		}//switch
		
		Debug.Log ("state : " + state + ", cnt:" + itemTotalCount);
		
		for (int i=0; i<itemTotalCount; i++) {
			GameObject popObj = SKCommon.loadPrefeb("_PShopToolsBox", selectPanel);
			popObj.GetComponent<UIToggle> ().group = (int)m_state;
			
			//item setting
			StorageItem im = popObj.GetComponent<StorageItem> ();
			im.state = (int)m_state;
			im.type = Random.Range (1, 10);
			im.index = i;
			im.imageName = "Icon_Equip_00" + Random.Range (1, 4);
			im.totalCount = Random.Range (1, 99);
			
			//image input
			popObj.transform.FindChild ("_Image").GetComponent<UISprite> ().spriteName = im.imageName;
			
			switch (m_state) {
				
			case StorageState.TREASURE_BOX:
				popObj.transform.FindChild ("NumBoard").gameObject.SetActive (true);
				popObj.transform.FindChild ("NumBoard").transform.FindChild ("_Num").GetComponent<UILabel> ().text = "" + im.totalCount;
				break;
				
			case StorageState.EQUIL:
					//아이템 착용 여부
				popObj.transform.FindChild ("_EquippedCheck").gameObject.SetActive (true);
					//등급표시 별5개
				GameObject gradeGrid = popObj.transform.FindChild ("_GradeStar").gameObject;
				gradeGrid.SetActive (true);
				int cnt = TOTAL_GRADE - (Random.Range (1, 5));
				for (int z=0; z<cnt; z++) {
					GameObject o = gradeGrid.transform.FindChild ("obj_" + z).gameObject;
					DestroyImmediate (o);
				}
				gradeGrid.GetComponent<UIGrid> ().Reposition ();
				break;
				
			case StorageState.TOOLS:
				popObj.transform.FindChild ("NumBoard").gameObject.SetActive (true);
				popObj.transform.FindChild ("NumBoard").transform.FindChild ("_Num").GetComponent<UILabel> ().text = "" + im.totalCount;
				break;
			}
			
			//init select box 0 index
			if (i == 0) {
				popObj.GetComponent<UIToggle> ().startsActive = true;
			}

			_List.Add (popObj);
		}
		addToggleDelegate ();
		checkToggleSelect ();
		selectPanel.GetComponent<UIGrid> ().Reposition ();
	}
예제 #21
0
 public ActivityStorage(StorageState state, IDictionary <String, IActivity> activities, ExpandoObject obj = null)
 {
     IsLoading   = state == StorageState.Loading;
     _activities = activities;
     _expando    = obj ?? new ExpandoObject();
 }
		public BackgroundCompactor(StorageState state) : base(state)
		{
		}
예제 #23
0
 public void RefreshSaveGameDescriptions()
 {
     state = StorageState.ReadyToRefreshSaveGames;
 }
예제 #24
0
 public SqlBytes(Stream s)
 {
     if (s == null)
     {
         this.notNull = false;
         this.buffer = null;
     }
     else
     {
         this.notNull = true;
         var len = (int) s.Length;
         this.buffer = new byte[len];
         s.Read(this.buffer, 0, len);
         this.storage = StorageState.Stream;
         this.Stream = s;
     }
 }
예제 #25
0
        private async Task PerformStartup(bool isResuming)
        {
            ProfilerThread thread = this.startupProfiler?.MainThread.CreateSubThread("AppStartup", ProfilerThreadType.Sequential);

            thread?.Start();

            try
            {
                thread?.NewState("Report");
                await this.SendErrorReportFromPreviousRun();

                thread?.NewState("Startup");
                ProfilerThread sdkStartupThread = this.startupProfiler?.CreateThread("SdkStartup", ProfilerThreadType.Sequential);
                sdkStartupThread?.Start();
                sdkStartupThread?.NewState("DB");

                this.sdk.UiDispatcher.IsRunningInTheBackground = false;

                // Start the db.
                // This is for soft restarts.
                // If this is a cold start, this call is made already in the App ctor, and this is then a no-op.
                this.sdk.StorageService.Init(sdkStartupThread);
                StorageState dbState = await this.sdk.StorageService.WaitForReadyState();

                if (dbState == StorageState.NeedsRepair)
                {
                    await this.sdk.StorageService.TryRepairDatabase(sdkStartupThread);
                }

                if (!isResuming)
                {
                    await this.CreateOrRestoreConfiguration();
                }

                sdkStartupThread?.NewState("Network");
                await this.sdk.NetworkService.Load(isResuming);

                sdkStartupThread?.NewState("Load");
                await this.sdk.NeuronService.Load(isResuming);

                sdkStartupThread?.NewState("Timer");
                TimeSpan initialAutoSaveDelay = Constants.Intervals.AutoSave.Multiply(4);
                this.autoSaveTimer = new Timer(async _ => await AutoSave(), null, initialAutoSaveDelay, Constants.Intervals.AutoSave);

                sdkStartupThread?.Stop();

                thread?.NewState("Navigation");
                await this.sdk.NavigationService.Load(isResuming);

                thread?.NewState("Cache");
                await this.imageCacheService.Load(isResuming);

                thread?.NewState("Orchestrators");
                await this.contractOrchestratorService.Load(isResuming);

                await this.thingRegistryOrchestratorService.Load(isResuming);
            }
            catch (Exception e)
            {
                e = Waher.Events.Log.UnnestException(e);
                thread?.Exception(e);
                this.DisplayBootstrapErrorPage(e.Message, e.StackTrace);
            }

            thread?.Stop();
            this.StartupCompleted("StartupProfile.uml", false);
        }
예제 #26
0
 public void SaveSession(SaveGameDescription description)
 {
     overwriteDescription = description;
     state = StorageState.ReadyToSave;
 }
예제 #27
0
 /// <summary>
 /// Constructor of StoragePage
 /// </summary>
 /// <param name="id">Id of storage</param>
 /// <param name="rootDirectory">Root directory of storage</param>
 /// <param name="totalSpace">Total space of storage</param>
 /// <param name="availableSpace">Available space of storage</param>
 /// <param name="state">State of storage</param>
 public StoragePage(int id, string rootDirectory, ulong totalSpace, ulong availableSpace, StorageState state)
 {
     InitializeComponent();
     CreateListView(id, rootDirectory, totalSpace, availableSpace, state);
 }
예제 #28
0
 public void LoadSession(string filename)
 {
     loadFilename = filename;
     state        = StorageState.ReadyToLoad;
 }
예제 #29
0
파일: SqlChars.cs 프로젝트: nlhepler/mono
		void IXmlSerializable.ReadXml (XmlReader reader)
		{
			if (reader == null)
				return;

			switch (reader.ReadState) {
			case ReadState.EndOfFile:
			case ReadState.Error:
			case ReadState.Closed:
				return;
			}
			// Skip XML declaration and prolog
			// or do I need to validate for the <string> tag?
			reader.MoveToContent ();
			if (reader.EOF)
				return;
			
			reader.Read ();
			if (reader.NodeType == XmlNodeType.EndElement)
				return;

			if (reader.Value.Length > 0) {
				if (String.Compare ("Null", reader.Value) == 0) {
					// means a null reference/invalid value
					notNull = false;
					return; 
				}
				// FIXME: Validate the value for expected format
				this.buffer = reader.Value.ToCharArray ();
				this.notNull = true;
				this.storage = StorageState.Buffer;
			}
		}
예제 #30
0
    void createStorage(StorageState state)
    {
        Debug.Log("createStorage (StorageState " + state + ")");

        if (selectPanel == mainObj.transform.FindChild("_PDrawble_" + (int)state).gameObject)
        {
            return;
        }

        if (state == StorageState.NONE)
        {
            return;
        }

        if (_List != null)
        {
            foreach (GameObject obj in _List)
            {
                DestroyObject(obj);
            }
            _List.Clear();
        }

        //bool bItemBtn = false;

        m_state = state;
        prefab  = Resources.Load("prefabs/_PShopToolsBox") as GameObject;

        selectPanel = mainObj.transform.FindChild("_PDrawble_" + (int)state).gameObject;

        switch (m_state)
        {
        case StorageState.TREASURE_BOX:
            itemTotalCount = equip_count;
            break;

        case StorageState.EQUIL:
            itemTotalCount = tools_count;
            break;

        case StorageState.TOOLS:
            itemTotalCount = boxs_count;
            break;
        }        //switch

        Debug.Log("state : " + state + ", cnt:" + itemTotalCount);

        for (int i = 0; i < itemTotalCount; i++)
        {
            GameObject popObj = SKCommon.loadPrefeb("_PShopToolsBox", selectPanel);
            popObj.GetComponent <UIToggle> ().group = (int)m_state;

            //item setting
            StorageItem im = popObj.GetComponent <StorageItem> ();
            im.state      = (int)m_state;
            im.type       = Random.Range(1, 10);
            im.index      = i;
            im.imageName  = "Icon_Equip_00" + Random.Range(1, 4);
            im.totalCount = Random.Range(1, 99);

            //image input
            popObj.transform.FindChild("_Image").GetComponent <UISprite> ().spriteName = im.imageName;

            switch (m_state)
            {
            case StorageState.TREASURE_BOX:
                popObj.transform.FindChild("NumBoard").gameObject.SetActive(true);
                popObj.transform.FindChild("NumBoard").transform.FindChild("_Num").GetComponent <UILabel> ().text = "" + im.totalCount;
                break;

            case StorageState.EQUIL:
                //아이템 착용 여부
                popObj.transform.FindChild("_EquippedCheck").gameObject.SetActive(true);
                //등급표시 별5개
                GameObject gradeGrid = popObj.transform.FindChild("_GradeStar").gameObject;
                gradeGrid.SetActive(true);
                int cnt = TOTAL_GRADE - (Random.Range(1, 5));
                for (int z = 0; z < cnt; z++)
                {
                    GameObject o = gradeGrid.transform.FindChild("obj_" + z).gameObject;
                    DestroyImmediate(o);
                }
                gradeGrid.GetComponent <UIGrid> ().Reposition();
                break;

            case StorageState.TOOLS:
                popObj.transform.FindChild("NumBoard").gameObject.SetActive(true);
                popObj.transform.FindChild("NumBoard").transform.FindChild("_Num").GetComponent <UILabel> ().text = "" + im.totalCount;
                break;
            }

            //init select box 0 index
            if (i == 0)
            {
                popObj.GetComponent <UIToggle> ().startsActive = true;
            }

            _List.Add(popObj);
        }
        addToggleDelegate();
        checkToggleSelect();
        selectPanel.GetComponent <UIGrid> ().Reposition();
    }
예제 #31
0
파일: SqlBytes.cs 프로젝트: nlhepler/mono
		public SqlBytes (Stream s)
		{
			if (s == null) {
				notNull = false;
				buffer = null;
			} else {
				notNull = true;
				int len = (int) s.Length;
				buffer = new byte [len];
				s.Read (buffer, 0, len);
				storage = StorageState.Stream;
				stream = s;
			}
		}
예제 #32
0
 public void MakeFirstPass()
 {
     state = StorageState.CheckAvailableSpace;
 }
예제 #33
0
		public TableCache(StorageState state)
		{
			this.state = state;
			cache = new LruCache<ulong, Table>(state.Options.MaxTablesCacheSize);
		}
		public ManualCompactor(StorageState state)
			: base(state)
		{
		}
예제 #35
0
		protected Compactor(StorageState state)
		{
			this.state = state;
		}
예제 #36
0
 public ClassController(ILogger <HomeController> logger, Storage storage, StorageState state)
 {
     _logger  = logger;
     _storage = storage;
     _state   = state;
 }
예제 #37
0
 public void DeleteSaveGame(SaveGameDescription description)
 {
     deleteDescription = description;
     state             = StorageState.ReadyToDelete;
 }
예제 #38
0
 public ApiController(Storage storage, StorageState state)
 {
     _storage = storage;
 }
예제 #39
0
 internal static extern ErrorCode StorageGetState(int id, out StorageState state);
예제 #40
0
        /// <summary>
        /// Method to create list view
        /// </summary>
        /// <param name="id">Id of storage</param>
        /// <param name="rootDirectory">Root directory of storage</param>
        /// <param name="totalSpace">Total space of storage</param>
        /// <param name="availableSpace">Available space of storage</param>
        /// <param name="state">State of storage</param>
        public void CreateListView(int id, string rootDirectory, ulong totalSpace, ulong availableSpace, StorageState state)
        {
            string str_state;

            if (state == StorageState.Mounted || state == StorageState.MountedReadOnly)
            {
                str_state = "Mounted";
            }
            else
            {
                str_state = "Unmounted";
            }

            List <StoragePrint> storages = new List <StoragePrint>
            {
                new StoragePrint("Id: " + id),
                new StoragePrint("Type: Internal Storage"),
                new StoragePrint("Root directory: " + rootDirectory),
                new StoragePrint("Total space: " + totalSpace),
                new StoragePrint("Available space: " + availableSpace),
                new StoragePrint("State: " + str_state),
            };

            StorageDetail.ItemsSource = storages;
        }
예제 #41
0
 public EntityController(Storage storage, StorageState state)
 {
     _storage = storage;
 }