Partilhar via


CodeContainer Class

Definition

A type that represents any source-code repository that Visual Studio can open and/or access, e.g. solution, folder.

public ref class CodeContainer sealed : IComparable<Microsoft::VisualStudio::Shell::CodeContainerManagement::CodeContainer ^>
public sealed class CodeContainer : IComparable<Microsoft.VisualStudio.Shell.CodeContainerManagement.CodeContainer>
type CodeContainer = class
    interface IComparable<CodeContainer>
Public NotInheritable Class CodeContainer
Implements IComparable(Of CodeContainer)
Inheritance
CodeContainer
Implements

Constructors

CodeContainer(CodeContainerLocalProperties, RemoteCodeContainer, Boolean, DateTimeOffset)

Initializes a new instance of the CodeContainer class. Either localProperties or remote (or both) must be non-null.

CodeContainer(CodespaceCodeContainer, Boolean, DateTimeOffset)

Initializes a new instance of the CodeContainer class.

Properties

CodespaceProperties

Properties for Codespace codecontainer.

HasRemote

Indicates whether a CodeContainer has a remote set.

IsCodespace

Indicates whether a CodeContainer has codespace properties set.

IsFavorite

A flag that indicates whether this CodeContainer should be presented with special emphasis on Visual Studio's MRU.

IsLocal

Indicates whether a CodeContainer has local properties set.

IsSourceControlled

Indicates whether a CodeContainer has source control properties set.

LastAccessed

Last accessed timestamp.

LocalProperties

Properties of a CodeContainer that pertain to its existence on users machines.

Remote

The server-side version of a CodeContainer.

Methods

CompareTo(CodeContainer)

Compares two CodeContainer instances based on their LastAccessed timestamp.

GetStatus()

Retrieves the CodeContainerStatus of CodeContainer, e.g. is item under source-control, does it have an associated RemoteCodeContainer.

WithIsFavorite(Boolean)

Returns a CodeContainer whose IsFavorite has been set to isFavorite.

WithLastAccessed(DateTimeOffset)

Returns a CodeContainer whose LastAccessed has been set to lastAccessed.

WithLocalProperties(CodeContainerLocalProperties)

Returns a CodeContainer whose LocalProperties is set to the supplied localProperties.

WithRemote(RemoteCodeContainer)

Returns a CodeContainer whose RemoteCodeContainer is set to the supplied remote.

Applies to