/// <summary> /// Processes the static fields on the specified type. /// </summary> /// <param name="theType">The type to process.</param> private void ProcessStaticFields(Type theType) { FieldInfo[] staticFields = theType.GetFields(BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public); foreach(FieldInfo anInfo in staticFields) { string FieldID = TheScannerState.AddStaticField(anInfo); DB_StaticField dbStaticField = new DB_StaticField(); dbStaticField.Id = FieldID; dbStaticField.TypeID = ProcessType(anInfo.FieldType).Id; dbStaticField.DeclaringTypeID = ProcessType(anInfo.DeclaringType).Id; DebugDatabase.AddStaticField(dbStaticField); } }
partial void UpdateDB_StaticField(DB_StaticField instance);
partial void DeleteDB_StaticField(DB_StaticField instance);
partial void InsertDB_StaticField(DB_StaticField instance);
private void detach_StaticFields1(DB_StaticField entity) { this.SendPropertyChanging(); entity.DB_Type1 = null; }
private void attach_StaticFields(DB_StaticField entity) { this.SendPropertyChanging(); entity.DB_Type = this; }
/// <summary> /// Removes the specified static field from the database. /// <para>To Do's: See <see cref="RemoveMethod"/>'s to do's.</para> /// </summary> /// <param name="aStaticField">The entry to remove.</param> /// <remarks> /// <para> /// For the moment this method does no more than just directly remove /// the entry from the database. /// </para> /// <para> /// <see cref="SubmitChanges"/> must be called at some point after this /// method for changes to actually be submitted to the database. /// </para> /// </remarks> public static void RemoveStaticField(DB_StaticField aStaticField) { DB.DB_StaticFields.DeleteOnSubmit(aStaticField); }
/// <summary> /// Adds the pre-created static field to the database. All the entries's /// required parameters (i.e. ones which cannot be null) should /// be set. /// <para>To Do's: See <see cref="AddMethod"/>'s to do's.</para> /// </summary> /// <param name="aStaticField">The entry to add.</param> /// <remarks> /// <para> /// For the moment this method does no more than just directly add /// the entry to the database. /// </para> /// <para> /// <see cref="SubmitChanges"/> must be called at some point after this /// method for changes to actually be submitted to the database. /// </para> /// </remarks> public static void AddStaticField(DB_StaticField aStaticField) { DB.DB_StaticFields.InsertOnSubmit(aStaticField); }