public ElementSetSelafinBase(ISpatialDefinition spatial, ElementType elementType, FileInfo selafinFileInfo = null)
            : base(spatial, elementType)
        {
            Arguments = new IArgument[] {
                new ArgumentFile(new Identity("Selafin file"), selafinFileInfo),
                }.ToList();

            Selafin = new Selafin(selafinFileInfo);
        }
        public void Initialise(XElement xElement, IDocumentAccessor accessor)
        {
            xElement = Persistence.ThisOrSingleChild(XName, xElement);

            ISpatialDefinition spatial;
            bool hasZ, hasM;
            ElementType = Persistence.ElementSet.Parse(xElement, accessor, out spatial, out hasZ, out hasM);
            SetSpatial(spatial);
            HasZ = hasZ;
            HasM = hasM;

            string relative = xElement.Value;

            var uri = new Uri(accessor.Uri, relative);

            var selafin = new FileInfo(uri.LocalPath);

            Selafin = new Selafin(selafin);

               var argIdSelafin =  Utilities.Xml.GetAttribute(xElement, "argIdSelafin");

               Arguments = new IArgument[] {
                new ArgumentFile(new Identity(argIdSelafin, "Selafin file"), selafin),
                }.ToList();

            Initialise();
        }
        public void UpdateGeometry(IElementSet elementSetEdits)
        {
            Contract.Requires(UpdateGeometryAvailable(elementSetEdits), "updateGeometryAvailable(elementSetEdits)");

            var e = elementSetEdits as ElementSetSelafinBase;

            Selafin = new Selafin(e.Selafin.FileInfo);
            Initialised = false;

            Version = elementSetEdits.Version;
            ElementType = elementSetEdits.ElementType;
            SpatialReferenceSystemWkt = elementSetEdits.SpatialReferenceSystemWkt;
            ElementCount = elementSetEdits.ElementCount;
        }