NClass.DiagramEditor.Style.Load C# (CSharp) Method

Load() private static method

private static Load ( string path, bool addToList ) : Style
path string
addToList bool
return Style
		private static Style Load(string path, bool addToList)
		{
			try
			{
				using (Stream stream = new FileStream(path, FileMode.Open))
				{
					BinaryFormatter formatter = new BinaryFormatter();
					Style result = (Style) formatter.Deserialize(stream);

					if (addToList && result != null)
						AddToList(result, path);

					return result;
				}
			}
			catch
			{
				return null;
			}
		}

Same methods

Style::Load ( string path ) : Style