Raven.Storage.Esent.TransactionalStorageConfigurator.TranslateToSizeInDatabasePages C# (CSharp) Method

TranslateToSizeInDatabasePages() private static method

private static TranslateToSizeInDatabasePages ( int sizeInMegabytes, int multiply ) : int
sizeInMegabytes int
multiply int
return int
		private static int TranslateToSizeInDatabasePages(int sizeInMegabytes, int multiply)
		{
			//This doesn't suffer from overflow, do the division first (to make the number smaller) then multiply afterwards
			double tempAmt = (double)sizeInMegabytes / SystemParameters.DatabasePageSize;
			int finalSize = (int)(tempAmt * multiply);
			return finalSize;
		}