public AssociationWithAllState GetAssocation(AssociationExtrinsicState extrinsicState)
        {
            AssociationWithIntrinsicState assocationWithIntrinsicState;

            if (sharedAssocations.ContainsKey(extrinsicState.AssocationType))
            {
                assocationWithIntrinsicState = sharedAssocations[extrinsicState.AssocationType];
            }
            else
            {
                assocationWithIntrinsicState = new AssociationWithIntrinsicState();
                string resourceName = string.Format(ResourceNamePattern, extrinsicState.AssocationType);
                assocationWithIntrinsicState.LoadFromResource(resourceName, ReferenceType);
                sharedAssocations.Add(extrinsicState.AssocationType, assocationWithIntrinsicState);
            }

            return(new AssociationWithAllState(assocationWithIntrinsicState, extrinsicState));
        }
 internal AssociationWithAllState(AssociationWithIntrinsicState sharedPart, AssociationExtrinsicState nonsharedPart)
 {
     IntrinsicState = sharedPart;
     ExtrinsicState = nonsharedPart;
 }