AnnotationStore.GetAnnotations Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Depoda bulunan ek açıklamaların listesini döndürür.
Aşırı Yüklemeler
GetAnnotations() |
Depodaki tüm ek açıklamaların listesini döndürür. |
GetAnnotations(ContentLocator) |
Eşleşen ContentLocatorPart bir diziyle başlayan bulucuları olan ek açıklamaların Anchors listesini döndürür. |
Örnekler
Aşağıdaki örnekte, depoda GetAnnotations herhangi bir ek açıklama olup olmadığını belirlemek için yönteminin nasıl kullanılacağı gösterilmektedir.
// ---------------------------- CloseFile -----------------------------
private void CloseFile()
{
// If there are existing annotations, then they should be saved.
if (_annStore.GetAnnotations().Count > 0)
{
string backupFile = _fileName + ".annotations" + ".xml";
FileStream backupStream = new FileStream(backupFile, FileMode.Create);
CopyStream(_annotationBuffer, backupStream);
_annStore.Flush();
_annServ.Disable();
}
}
GetAnnotations()
Depodaki tüm ek açıklamaların listesini döndürür.
public:
abstract System::Collections::Generic::IList<System::Windows::Annotations::Annotation ^> ^ GetAnnotations();
public abstract System.Collections.Generic.IList<System.Windows.Annotations.Annotation> GetAnnotations ();
abstract member GetAnnotations : unit -> System.Collections.Generic.IList<System.Windows.Annotations.Annotation>
Public MustOverride Function GetAnnotations () As IList(Of Annotation)
Döndürülenler
Şu anda depoda bulunan tüm ek açıklamaların listesi.
Özel durumlar
Dispose mağazadan arandı.
Örnekler
Aşağıdaki örnekte, depoda GetAnnotations herhangi bir ek açıklama olup olmadığını belirlemek için yönteminin nasıl kullanılacağı gösterilmektedir.
// ---------------------------- CloseFile -----------------------------
private void CloseFile()
{
// If there are existing annotations, then they should be saved.
if (_annStore.GetAnnotations().Count > 0)
{
string backupFile = _fileName + ".annotations" + ".xml";
FileStream backupStream = new FileStream(backupFile, FileMode.Create);
CopyStream(_annotationBuffer, backupStream);
_annStore.Flush();
_annServ.Disable();
}
}
Ayrıca bkz.
Şunlara uygulanır
GetAnnotations(ContentLocator)
Eşleşen ContentLocatorPart bir diziyle başlayan bulucuları olan ek açıklamaların Anchors listesini döndürür.
public:
abstract System::Collections::Generic::IList<System::Windows::Annotations::Annotation ^> ^ GetAnnotations(System::Windows::Annotations::ContentLocator ^ anchorLocator);
public abstract System.Collections.Generic.IList<System.Windows.Annotations.Annotation> GetAnnotations (System.Windows.Annotations.ContentLocator anchorLocator);
abstract member GetAnnotations : System.Windows.Annotations.ContentLocator -> System.Collections.Generic.IList<System.Windows.Annotations.Annotation>
Public MustOverride Function GetAnnotations (anchorLocator As ContentLocator) As IList(Of Annotation)
Parametreler
- anchorLocator
- ContentLocator
için eşleşen ek açıklamaların döndürüleceği başlangıç ContentLocatorPart dizisi.
Döndürülenler
Verilen anchorLocator
ile başlayıp eşleşen bulucularla olan Anchors ek açıklamaların listesi; aksi takdirde eşleşen null
ek açıklamalar bulunamadıysa.
Açıklamalar
Bu GetAnnotations yöntem, döndürülecek ek açıklamaları aramak ve eşleştirmek için sınıfının yöntemini ContentLocator dahili olarak kullanırStartsWith.