예제 #1
0
        public void Update(IEnumerable <StoredAnnotationLayout> layouts)
        {
            lock (_syncLock)
            {
                Initialize(false);

                try
                {
                    StoredAnnotationLayoutSerializer serializer = new StoredAnnotationLayoutSerializer();
                    foreach (StoredAnnotationLayout layout in layouts)
                    {
                        Platform.CheckForNullReference(layout, "layout");
                        Platform.CheckForEmptyString(layout.Identifier, "layout.Identifier");

                        serializer.SerializeLayout(layout);
                    }

                    SaveSettings();
                }
                catch (Exception e)
                {
                    Platform.Log(LogLevel.Debug, e);
                    Initialize(true);
                }
            }
        }
예제 #2
0
		public void Update(IEnumerable<StoredAnnotationLayout> layouts)
		{
			lock (_syncLock)
			{
				Initialize(false);

				try
				{
					StoredAnnotationLayoutSerializer serializer = new StoredAnnotationLayoutSerializer();
					foreach (StoredAnnotationLayout layout in layouts)
					{
						Platform.CheckForNullReference(layout, "layout");
						Platform.CheckForEmptyString(layout.Identifier, "layout.Identifier");

                        serializer.SerializeLayout(layout);
					}

					SaveSettings();
				}
				catch (Exception e)
				{
					Platform.Log(LogLevel.Debug, e);
					Initialize(true);
				}
			}
		}