~ubuntu-branches/ubuntu/natty/smuxi/natty

« back to all changes in this revision

Viewing changes to lib/Twitterizer.Framework/InvalidTwitterParameterException.cs

  • Committer: Bazaar Package Importer
  • Author(s): Mirco Bauer
  • Date: 2010-01-11 22:47:12 UTC
  • mfrom: (1.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20100111224712-zyrhyny5gbx4t3cv
Tags: upstream-0.7
Import upstream version 0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * This file is part of the Twitterizer library <http://code.google.com/p/twitterizer/>
 
3
 *
 
4
 * Copyright (c) 2008, Patrick "Ricky" Smith <ricky@digitally-born.com>
 
5
 * All rights reserved.
 
6
 * 
 
7
 * Redistribution and use in source and binary forms, with or without modification, are 
 
8
 * permitted provided that the following conditions are met:
 
9
 *
 
10
 * - Redistributions of source code must retain the above copyright notice, this list 
 
11
 *   of conditions and the following disclaimer.
 
12
 * - Redistributions in binary form must reproduce the above copyright notice, this list 
 
13
 *   of conditions and the following disclaimer in the documentation and/or other 
 
14
 *   materials provided with the distribution.
 
15
 * - Neither the name of the Twitterizer nor the names of its contributors may be 
 
16
 *   used to endorse or promote products derived from this software without specific 
 
17
 *   prior written permission.
 
18
 *
 
19
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
 
20
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
 
21
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
 
22
 * IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
 
23
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
 
24
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
 
25
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
 
26
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
 
27
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
 
28
 * POSSIBILITY OF SUCH DAMAGE.
 
29
 */
 
30
 
 
31
using System;
 
32
 
 
33
namespace Twitterizer.Framework
 
34
{
 
35
    public enum InvalidTwitterParameterReason
 
36
    {
 
37
        /// <summary>
 
38
        /// A required parameter was not supplied.
 
39
        /// </summary>
 
40
        MissingRequiredParameter = 0,
 
41
        
 
42
        /// <summary>
 
43
        /// The parameter value was invalid.
 
44
        /// </summary>
 
45
        ValueOutOfRange = 1,
 
46
 
 
47
        /// <summary>
 
48
        /// The parameter is not supported for the method invoked.
 
49
        /// </summary>
 
50
        ParameterNotSupported = 2
 
51
    }
 
52
 
 
53
    public class InvalidTwitterParameterException : ArgumentException
 
54
    {
 
55
        public TwitterParameterNames Parameter { get; set; }
 
56
        public InvalidTwitterParameterReason Reason { get; set; }
 
57
 
 
58
        public InvalidTwitterParameterException(TwitterParameterNames Parameter, InvalidTwitterParameterReason Reason)
 
59
        {
 
60
            this.Parameter = Parameter;
 
61
            this.Reason = Reason;
 
62
        }
 
63
    }
 
64
}