Class Scope
Inheritance
System.Object
    Scope
  Implements
System.IDisposable
  Inherited Members
      System.Object.Equals(System.Object, System.Object)
    
    
      System.Object.GetType()
    
    
      System.Object.MemberwiseClone()
    
    
      System.Object.ReferenceEquals(System.Object, System.Object)
    
  Namespace: Couchbase.Lite
Assembly: Couchbase.Lite.dll
Syntax
public sealed class Scope : IDisposableProperties
| Improve this Doc View SourceName
Gets the Scope Name
Declaration
public string Name { get; }Property Value
| Type | Description | 
|---|---|
| System.String | 
Remarks
Naming rules: Must be between 1 and 251 characters in length. Can only contain the characters A-Z, a-z, 0-9, and the symbols , -, and %. Cannot start with or %. Case sensitive.
Methods
| Improve this Doc View SourceDispose()
Declaration
public void Dispose()Equals(Object)
Declaration
public override bool Equals(object obj)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Object | obj | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
Overrides
System.Object.Equals(System.Object)
  
    |
    Improve this Doc
  
  
    View Source
  
  
  GetCollection(String)
Gets one collection of the given name
Declaration
public Collection GetCollection(string name)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | name | The collection name | 
Returns
| Type | Description | 
|---|---|
| Collection | The collection of the given name. null if the collection doesn't exist in the Scope | 
Exceptions
| Type | Condition | 
|---|---|
| CouchbaseException | Thrown if an error condition is returned from LiteCore | 
| CouchbaseLiteException | Thrown with LiteCore.Interop.C4ErrorCode.NotFound if Couchbase.Lite.Scope.Database is closed | 
| System.InvalidOperationException | Thrown if Collection is not valid. | 
GetCollections()
Get all collections in this scope object.
Declaration
public IReadOnlyList<Collection> GetCollections()Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyList<Collection> | All collections in this scope object. Empty list if these is no collection in the Scope. | 
Exceptions
| Type | Condition | 
|---|---|
| CouchbaseException | Thrown if an error condition is returned from LiteCore | 
GetHashCode()
Declaration
public override int GetHashCode()Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Overrides
System.Object.GetHashCode()
  
    |
    Improve this Doc
  
  
    View Source
  
  
  ToString()
Declaration
public override string ToString()Returns
| Type | Description | 
|---|---|
| System.String | 
Overrides
System.Object.ToString()
  Implements
      System.IDisposable