ObjectStore
is an enumeration that defines the possible values returned by calls like IObjectStorageProvider.CreateContainer
. For example, you could get an ObjectStore
by attempting to create the container you're checking, and the return value would be ContainerExists
if the container already exists. Unfortunately you could always end up with ContainerCreated
returned by that call, i.e. if you use CreateContainer
to check for a container's existence, then even if the container didn't exist before "checking", it would afterwards.
While it's definitely not clean, one option is calling GetContainerMetadata
. The call will throw an ItemNotFoundException
if the container doesn't exist.