Runtime SDK for Mobile 10.1 - FeatureLayerSyncAgent - layer name removed?

3064
3
11-26-2012 06:52 AM
ChrisSeabrooke
New Contributor III
In ArcGIS Mobile 10, the SyncAgentCollection could be indexed by layer name. we have code to access the feature layer sync agents, like this:
FeatureLayer ftrLayer = (FeatureLayer)lyr;
FeatureLayerSyncAgent flsa = _mobileCacheSyncAgent.SyncAgents[ftrLayer] as FeatureLayerSyncAgent;

I can't find anything similar in the RunTime SDK for Mobile 10.1 -- the FeatureSyncAgents is a generic collection and appears to be accessible only by index. Is there a way to access the FeatureSyncAgents using the layerName as we've done in Mobile10?

Sorry if I'm posting in the wrong forum. I posted here because I didn't find a forum for the Runtime SDK for Mobile 10.1 on the forums list. Please let me know if it exists.

Chris
0 Kudos
3 Replies
ChrisSeabrooke
New Contributor III
Update to post-- I'm using the Runtime SDK for Mobile v3.1, not v10.1.

The FeatureLayerSyncAgent doesn't seem to have the features ordered in the same way as the mobile cache. I tried to get the index based on the mobile cache:
mobileCache.FeatureSources.IndexOf(_mobileCache.FeatureSources[layerName])]

But the index order appears to be reversed--the last item in the MobileCache matches the first item in the featureSyncAgent. In the code, we've customized sync to download only certain features, but we accessed those by name in Mobile 10.

Has anyone else run into this issue?
0 Kudos
StevenSchuldt
New Contributor
Which version of .net are you using?
0 Kudos
ChrisSeabrooke
New Contributor III
The application runs on a mobile device so I'm developing using: Visual Studio 2008 SP1 and .NET Compact Framework v3.5.
0 Kudos