AODL.Document.Import.OpenDocument.NodeProcessors.MainContentProcessor.CreateEmbedObject C# (CSharp) Метод

CreateEmbedObject() приватный Метод

private CreateEmbedObject ( XmlNode ObjNode ) : EmbedObject
ObjNode System.Xml.XmlNode
Результат AODL.Document.Content.EmbedObjects.EmbedObject
		private EmbedObject CreateEmbedObject(XmlNode ObjNode)
		{
			try
			{
				XmlNode ObjectNode                  = ObjNode.CloneNode (true);

				XmlNode node                        = ObjectNode.SelectSingleNode ("@xlink:href",this._document .NamespaceManager );

				string ObjectFullPath               = node.InnerText.Substring (2)+"/" ;

				string ObjectRealPath               = node.InnerText .Substring (2);

				string ObjectName                   =ObjectRealPath;

				//ObjectRealPath                      = ObjectRealPath.Replace ("/","\\");


				ObjectRealPath                      = Path.Combine (_document.DirInfo.Dir, ObjectRealPath);
				
				string MediaType                    = GetMediaType(ObjectFullPath);

				EmbedObjectHandler embedobjhandler  = new EmbedObjectHandler (this._document );

				return embedobjhandler.CreateEmbedObject (ObjectNode,MediaType,ObjectRealPath,ObjectName);
			}
			
			catch(Exception ex)
			{
				throw new AODLException("Exception while trying to create a Graphic.", ex);
			}
		}