An alternative to UBB.threads
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
FLocal/Patcher/Data/Command/AbstractStoredProcedureComm...

36 lines
1.5 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using Patcher.DB;
namespace Patcher.Data.Command
{
abstract class AbstractStoredProcedureCommand : AbstractPersistentCommand
{
private static readonly Dictionary<string, StoredProcedureReference.ParameterDirection> directions = new Dictionary<string, StoredProcedureReference.ParameterDirection>
{
{ "in", StoredProcedureReference.ParameterDirection.In },
{ "out", StoredProcedureReference.ParameterDirection.Out },
};
protected readonly StoredProcedureReference procedure;
protected AbstractStoredProcedureCommand(int num, XElement inner) : base(num)
{
XElement description = inner.Element("procedure");
this.procedure = new StoredProcedureReference(
description.Element("package").Value,
description.Element("name").Value,
from elem in description.Elements("parameter") select new StoredProcedureReference.ParameterDescription(
elem.Element("name").Value,
directions[elem.Element("direction").Value],
elem.Element("type").Value
)
);
}
}
}