~ubuntu-branches/ubuntu/trusty/smuxi/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/ServiceStack.Text/src/ServiceStack.Text/Support/AssemblyTypeDefinition.cs

  • Committer: Package Import Robot
  • Author(s): Mirco Bauer
  • Date: 2013-05-25 22:11:31 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20130525221131-nd2mc0kzubuwyx20
Tags: 0.8.11-1
* [22d13d5] Imported Upstream version 0.8.11
* [6d2b95a] Refreshed patches
* [89eb66e] Added ServiceStack libraries to smuxi-engine package
* [848ab10] Enable Campfire engine
* [c6dbdc7] Always build db4o for predictable build result
* [13ec489] Exclude OS X specific libraries from dh_clideps

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using System;
 
2
 
 
3
namespace ServiceStack.Common.Support
 
4
{
 
5
        internal class AssemblyTypeDefinition
 
6
        {
 
7
                private const char TypeDefinitionSeperator = ',';
 
8
                private const int TypeNameIndex = 0;
 
9
                private const int AssemblyNameIndex = 1;
 
10
 
 
11
                public AssemblyTypeDefinition(string typeDefinition)
 
12
                {
 
13
                        if (string.IsNullOrEmpty(typeDefinition))
 
14
                        {
 
15
                                throw new ArgumentNullException();
 
16
                        }
 
17
                        var parts = typeDefinition.Split(TypeDefinitionSeperator);
 
18
                        TypeName = parts[TypeNameIndex].Trim();
 
19
                        AssemblyName = (parts.Length > AssemblyNameIndex) ? parts[AssemblyNameIndex].Trim() : null;
 
20
                }
 
21
 
 
22
                public string TypeName { get; set; }
 
23
 
 
24
                public string AssemblyName { get; set; }
 
25
        }
 
26
}
 
 
b'\\ No newline at end of file'