SIL.FieldWorks.FieldWorks.SetupErrorPropertiesNeedingCache C# (CSharp) Метод

SetupErrorPropertiesNeedingCache() приватный статический Метод

Sets information about the current database to the ErrorReporter so that it can be reported with a crash.
private static SetupErrorPropertiesNeedingCache ( SIL.FieldWorks.FDO.FdoCache cache ) : void
cache SIL.FieldWorks.FDO.FdoCache
Результат void
		private static void SetupErrorPropertiesNeedingCache(FdoCache cache)
		{
			ErrorReporter.AddProperty("ProjectName", cache.ProjectId.Name);
			ErrorReporter.AddProperty("ProjectHandle", cache.ProjectId.Handle);
			ErrorReporter.AddProperty("Server", cache.ProjectId.ServerName);
			ErrorReporter.AddProperty("ProjectObjectCount",
				cache.ServiceLocator.GetInstance<ICmObjectRepository>().Count.ToString());
			if (cache.ProjectId.IsLocal && File.Exists(cache.ProjectId.Path))
			{
				FileInfo info = new FileInfo(cache.ProjectId.Path);
				ErrorReporter.AddProperty("ProjectModified", info.LastWriteTime.ToString());
				ErrorReporter.AddProperty("ProjectFileSize", info.Length.ToString());
			}
			else
			{
				ErrorReporter.AddProperty("ProjectModified", "unknown--probably not a local file");
				ErrorReporter.AddProperty("ProjectFileSize", "unknown--probably not a local file");
			}
		}
FieldWorks