Source

main / Source / WebService / Web.Service.Model / QueryData.cs

Full commit
Naethra D ba1cb57 
































































namespace DataUp.Web.Service.Model
{
    public class DQueryData
    {
        public DQueryData()
        {
        }

        private DKeyValuePair<string, string>[] keyValuePair;

        public DKeyValuePair<string, string>[] KeyValuePair
        {
            get
            {
                if (keyValuePair == null)
                    keyValuePair = new DKeyValuePair<string, string>[0];
                return keyValuePair;
            }
            set
            {
                keyValuePair = value;
            }
        }

        public DKeyValuePair<string, string> this[string key]
        {
            get
            {
                DKeyValuePair<string, string> _temp = null;
                if (KeyValuePair.Length != 0 && KeyValuePair.Length == 1)
                    return KeyValuePair[0];
                else if (KeyValuePair.Length > 0)
                {
                    for (int index = 0; index <= KeyValuePair.Length - 1; index++)
                    {
                        _temp = KeyValuePair[index];
                        if (_temp.Key == key)
                            return _temp;
                    }
                }
                return null;
            }
        }

        private ParameterMetadataDetail[] parameterMetadata;

        public ParameterMetadataDetail[] ParameterMetadata
        {
            get
            {
                if (parameterMetadata == null)
                {
                    parameterMetadata = new ParameterMetadataDetail[0];
                }

                return parameterMetadata;
            }
            set
            {
                parameterMetadata = value;
            }
        }
    }
}