public abstract void AccessDoor(string Token, bool UseExtendedTime, [System.Xml.Serialization.XmlIgnoreAttribute()] bool UseExtendedTimeSpecified, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string AccessTime, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string OpenTooLongTime, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string PreAlarmTime, AccessDoorExtension Extension);
        public override void AccessDoor(string Token, bool UseExtendedTime, [System.Xml.Serialization.XmlIgnoreAttribute()] bool UseExtendedTimeSpecified, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string AccessTime, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string OpenTooLongTime, [System.Xml.Serialization.XmlElementAttribute(DataType = "duration")] string PreAlarmTime, AccessDoorExtension Extension)
        {
            ConfStorageLoad();
            EventServerLoad();

            LoggingService.LogMessage(string.Format("AccessDoor operation requested for {0}", Token),
                                      ExternalLogging.MessageType.Details);

            if (ConfStorage.DoorStateList.ContainsKey(Token))
            {
                if (ConfStorage.DoorCapabilitiesList[Token].MomentaryAccess)
                {
                    if ((ConfStorage.DoorStateList[Token].DoorMode == DoorModeType.Blocked) || (ConfStorage.DoorStateList[Token].DoorMode == DoorModeType.LockedDown) || (ConfStorage.DoorStateList[Token].DoorMode == DoorModeType.LockedOpen))
                    {
                        string message = "Door " + Token + " is " + ConfStorage.DoorStateList[Token].DoorMode.ToString() +
                                         ". Operation denied.";

                        LoggingService.LogMessage(message, ExternalLogging.MessageType.Error);

                        throw FaultLib.GetSoapException(FaultType.General, message);
                    }
                    else
                    {
                        try
                        {
                            TimeSpan timeSpan = System.Xml.XmlConvert.ToTimeSpan(AccessTime);

                            ConfStorage.DoorStateList[Token].DoorMode = DoorModeType.Accessed;

                            EventServer.DoorModeEvent(this, "Changed", Token, ConfStorage.DoorStateList[Token].DoorMode);

                            AccessToDoor func = new AccessToDoor(AccessToDoorImplementation);
                            ConfStorage.DoorAccessList[Token]++;
                            func.BeginInvoke(Token, timeSpan, ConfStorage.DoorAccessList[Token], null, null);
                        }
                        catch (Exception)
                        {
                            LoggingService.LogMessage(string.Format("Wrong duration ({0})", AccessTime), ExternalLogging.MessageType.Error);
                            throw FaultLib.GetSoapException(FaultType.General, "Wrong duration.");
                        }
                    }
                }
                else
                {
                    string message = string.Format("MomentaryAccess isn't supported for {0}.", Token);
                    LoggingService.LogMessage(message, ExternalLogging.MessageType.Error);

                    throw FaultLib.GetSoapException(FaultType.General, message);
                }
            }
            else
            {
                string message = string.Format("Token {0} does not exist", Token);
                LoggingService.LogMessage(message, ExternalLogging.MessageType.Error);
                throw FaultLib.GetSoapException(FaultType.General, message);
            }

            EventServerSave();
            ConfStorageSave();
        }