本文整理汇总了C#中Android.Content.ContentValues.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ContentValues.ToString方法的具体用法?C# ContentValues.ToString怎么用?C# ContentValues.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Android.Content.ContentValues
的用法示例。
在下文中一共展示了ContentValues.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Update
public override int Update (Uri uri, ContentValues values, string selection, string[] selectionArgs)
{
if (LOGV) Log.Verbose(TAG, "update(uri=" + uri + ", values=" + values.ToString() + ")");
SQLiteDatabase db = mOpenHelper.WritableDatabase;
SelectionBuilder builder = BuildSimpleSelection(uri);
int retVal = builder.Where(selection, selectionArgs).Update(db, values);
Context.ContentResolver.NotifyChange(uri, null);
return retVal;
}
示例2: Insert
public override Uri Insert (Uri uri, ContentValues values)
{
if (LOGV) Log.Verbose(TAG, "insert(uri=" + uri + ", values=" + values.ToString() + ")");
SQLiteDatabase db = mOpenHelper.WritableDatabase;
int match = sUriMatcher.Match(uri);
switch (match) {
case BLOCKS: {
db.InsertOrThrow(ScheduleDatabase.Tables.BLOCKS, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.Blocks.BuildBlockUri(values.GetAsString(ScheduleContract.Blocks.BLOCK_ID));
}
case TRACKS: {
db.InsertOrThrow(ScheduleDatabase.Tables.TRACKS, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.Tracks.BuildTrackUri(values.GetAsString(ScheduleContract.Tracks.TRACK_ID));
}
case ROOMS: {
db.InsertOrThrow(ScheduleDatabase.Tables.ROOMS, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.Rooms.BuildRoomUri(values.GetAsString(ScheduleContract.Rooms.ROOM_ID));
}
case SESSIONS: {
db.InsertOrThrow(ScheduleDatabase.Tables.SESSIONS, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.Sessions.BuildSessionUri(values.GetAsString(ScheduleContract.Sessions.SESSION_ID));
}
case SESSIONS_ID_SPEAKERS: {
db.InsertOrThrow(ScheduleDatabase.Tables.SESSIONS_SPEAKERS, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.Speakers.BuildSpeakerUri(values.GetAsString(ScheduleDatabase.SessionsSpeakers.SPEAKER_ID));
}
case SESSIONS_ID_TRACKS: {
db.InsertOrThrow(ScheduleDatabase.Tables.SESSIONS_TRACKS, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.Tracks.BuildTrackUri(values.GetAsString(ScheduleDatabase.SessionsTracks.TRACK_ID));
}
case SPEAKERS: {
db.InsertOrThrow(ScheduleDatabase.Tables.SPEAKERS, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.Speakers.BuildSpeakerUri(values.GetAsString(ScheduleContract.Speakers.SPEAKER_ID));
}
case VENDORS: {
db.InsertOrThrow(ScheduleDatabase.Tables.VENDORS, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.Vendors.BuildVendorUri(values.GetAsString(ScheduleContract.Vendors.VENDOR_ID));
}
case SEARCH_SUGGEST: {
db.InsertOrThrow(ScheduleDatabase.Tables.SEARCH_SUGGEST, null, values);
Context.ContentResolver.NotifyChange(uri, null);
return ScheduleContract.SearchSuggest.CONTENT_URI;
}
default: {
throw new Exception("Unknown uri: " + uri);
}
}
}