Game Development Reference
In-Depth Information
private NamedPermissionSet FindNamedPermissionSet(string name)
{
IEnumerator policyEnumerator = SecurityManager.PolicyHierarchy();
while (policyEnumerator.MoveNext())
{
PolicyLevel currentLevel = policyEnumerator.Current
as PolicyLevel;
if (currentLevel.Label == “Machine”)
{
IList namedPermissions = currentLevel.NamedPermissionSets;
IEnumerator namedPerm = namedPermissions.GetEnumerator();
while (namedPerm.MoveNext())
{
if (((NamedPermissionSet)namedPerm.Current).Name == name)
{
return ((NamedPermissionSet)namedPerm.Current);
}
}
}
}
return null;
}
}
}
Each instance of the plugin library class represents a plugin assembly or source file
in the plugins directory. Therefore, each plugin has its own temporary AppDomain
that can be unloaded at will without affecting the rest of the system.
Reloading Plugins During Runtime
The majority of plugin-enabled applications load and initialize all plugins when
the application first launches, but plugins would not be reloaded if they had
changed on the file system. The new version of the plugins would not be visible
until the application had relaunched. It would be even better if the application
could detect file system changes and automatically reload plugins that had changed.
This would greatly speed up plugin debugging and development.
Search Nedrilad ::




Custom Search