我對xamarin和移動開發相當陌生。我目前正在將Firebase的geofire庫遷移到xamarin.ios。我遇到了下面的Objective-C代碼並試圖找出實際上在做什麼?和C#的等效:NSMutableDictionary&dispatch_async本地對象C#等效或類似
@property (nonatomic, strong) NSMutableDictionary *keyEnteredObservers;
...
GFQueryLocationInfo *info = self.locationInfos[key];
[self.keyEnteredObservers enumerateKeysAndObjectsUsingBlock:^(id observerKey,
GFQueryResultBlock block,
BOOL *stop) {
dispatch_async(self.geoFire.callbackQueue, ^{ // the callbackQueue is of type @property (nonatomic, strong) dispatch_queue_t callbackQueue;
block(key, info.location);
});
}];
對於我目前使用的類型BlockingCollection <「的任務>
任何幫助的callbackQueue是極大的讚賞。
是的,我現在還在使用的NSMutableDictionary,這正是我需要的。謝謝。 –