public IAttributeSetInstanceExtensionFieldState Get(AttributeSetInstanceExtensionFieldId id) { IAttributeSetInstanceExtensionFieldState state = CurrentSession.Get <AttributeSetInstanceExtensionFieldState>(id); if (state == null) { state = new AttributeSetInstanceExtensionFieldState(); (state as AttributeSetInstanceExtensionFieldState).AttributeSetInstanceExtensionFieldId = id; } return(state); }
public static IEnumerable <IAttributeSetInstanceExtensionFieldState> ToAttributeSetInstanceExtensionFieldStateCollection(IEnumerable <string> ids) { var states = new List <AttributeSetInstanceExtensionFieldState>(); foreach (var id in ids) { var s = new AttributeSetInstanceExtensionFieldState(); s.Name = id; states.Add(s); } return(states); }
public IAttributeSetInstanceExtensionFieldState Get(string id, bool nullAllowed) { IAttributeSetInstanceExtensionFieldState state = CurrentSession.Get <AttributeSetInstanceExtensionFieldState> (id); if (!nullAllowed && state == null) { state = new AttributeSetInstanceExtensionFieldState(); (state as AttributeSetInstanceExtensionFieldState).Name = id; } if (ReadOnlyProxyGenerator != null && state != null) { return(ReadOnlyProxyGenerator.CreateProxy <IAttributeSetInstanceExtensionFieldState>(state, new Type[] { }, _readOnlyPropertyNames)); } return(state); }