Sdl.Web.Tridion/ContentManager/TcmUri.cs
/// <summary>
/// Gets a value indicating the Repository.
/// </summary>
/// <param name="expectSystemRepository">In case the PublicationID is null then return the expectedSystemRepository or null.</param>
/// <returns>
/// The identifier of the context Repository.
/// 0 if the context Repository Id is <see cref="_idNull"/> and expecting the System Repository.
/// <see cref="_idNull"/> if the context Repository is <see cref="_idNull"/> and not expecting the system Repository.
/// </returns>
Gets a value indicating the Repository.
Gets a value indicating the Repository .
public int GetContextRepositoryId(bool expectSystemRepository)
        {
            if (_itemType == ItemType.Publication)
            {
                return (int)_itemId;
            }
            if (_publicationId == 0)
            {
                return expectSystemRepository ? 0 : _idNull;
            }
            return (int)_publicationId;
        }
public int GetContextRepositoryId ( bool expectSystemRepository ) { if ( _itemType == ItemType . Publication ) { return ( int ) _itemId ; } if ( _publicationId == 0 ) { return expectSystemRepository ? 0 : _idNull ; } return ( int ) _publicationId ; }
Gets a value indicating the Repository.
Gets a value indicating the Repository .
The identifier of the context Repository.
0 if the context Repository Id is  and expecting the System Repository.
if the context Repository is  and not expecting the system Repository.
The identifier of the context Repository . 0 if the context Repository Id is and expecting the System Repository . if the context Repository is and not expecting the system Repository .
expectSystemRepository
bool
In case the PublicationID is null then return the expectedSystemRepository or null.
In case the PublicationID is null then return the expectedSystemRepository or null .