private TypeId_I GetStandardTypeIdTypeId(TypeGlobalContext_I context) { lock (context.SyncRoot) { if (context.StandardTypeIdTypeId == null) { StandardTypeId id = new StandardTypeId(); XIdentification.IssueId(id); id.TypeId = id; context.StandardTypeIdTypeId = id; } return(context.StandardTypeIdTypeId); } }
public TypeId_I AddTypeId(RuntimeTypeHandle typeHandle) { var context = GetGlobalContext(); lock (context.SyncRoot) { var standardType = new StandardTypeId() { TypeId = GetStandardTypeIdTypeId(context) }; XIdentification.IssueId(standardType); context.TypeIdsByTypeHandle.Add(typeHandle, standardType); context.TypeHandles.Add(standardType.Value, typeHandle); return(standardType); } }